WorstStateCalculator Class Reference

State calculator for not only generating the state for a number of sub-calculators, but also to sum up according to the worst state of them all. More...

Inheritance diagram for WorstStateCalculator:
StateCalculator AverageStateCalculator BestStateCalculator

Public Member Functions

 set_sub_reports ($subs)
 Provide this object with a number of sub reports which we'll keep up to date.
 initialize ($initial_state, $initial_depth, $is_running)
 Initializes anything we need for this report to be generated.
 add_event ($row=false)
 Given an event (a database row), add it to the current report.
 get_data ()
 For hysterical reasons, we expect every single report type to return the report data in a brand new way.
 finalize ()
 Finalize the report, calculating real uptime from our internal meta-format.

Protected Member Functions

 calculate_object_state ()
 Actually discover the overall state based on the sub-reports.

Protected Attributes

 $sub_reports = array()
 An array of sub-reports for this report.
 $st_sub = array()
 Map of sub report [state => [downtime_status => [indexes]]].

Detailed Description

State calculator for not only generating the state for a number of sub-calculators, but also to sum up according to the worst state of them all.


Member Function Documentation

WorstStateCalculator::get_data (  ) 

For hysterical reasons, we expect every single report type to return the report data in a brand new way.

Jay.

Returns:
array

Reimplemented from StateCalculator.

WorstStateCalculator::initialize ( initial_state,
initial_depth,
is_running 
)

Initializes anything we need for this report to be generated.

Warning: all sub reports must have been initialized at this point.

Reimplemented from StateCalculator.

WorstStateCalculator::set_sub_reports ( subs  ) 

Provide this object with a number of sub reports which we'll keep up to date.

They should all be initialized externally, but other than that, hands off!


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 19 Dec 2018 for ninja by  doxygen 1.6.1