com.caucho.server.admin
Class ProStatSystem

java.lang.Object
  extended by com.caucho.env.service.AbstractResinSubSystem
      extended by com.caucho.server.admin.StatSystem
          extended by com.caucho.server.admin.ProStatSystem
All Implemented Interfaces:
ResinSubSystem, AlarmListener, java.util.EventListener

@Service
public class ProStatSystem
extends StatSystem
implements AlarmListener

statistics


Nested Class Summary
 class ProStatSystem.Admin
           
 
Nested classes/interfaces inherited from class com.caucho.server.admin.StatSystem
StatSystem.JmxItem, StatSystem.Sample
 
Field Summary
static int START_PRIORITY
           
 
Fields inherited from interface com.caucho.env.service.ResinSubSystem
START_PRIORITY_CACHE_SERVICE, START_PRIORITY_CLASSLOADER, START_PRIORITY_CLUSTER_SERVICE, START_PRIORITY_DEFAULT, START_PRIORITY_ENV_SYSTEM, START_PRIORITY_NETWORK_CLUSTER
 
Method Summary
 void addAnalyzer(HealthAnalyzer analyzer)
           
 void addJmx(StatSystem.JmxItem item)
           
 void addJmxDelta(StatSystem.JmxItem item)
           
 void addJmxDeltaMeter(java.lang.String name, java.lang.String objectName, java.lang.String attribute)
           
 void addJmxMeter(java.lang.String name, java.lang.String objectName, java.lang.String attribute)
           
 void addJmxPercentMeter(java.lang.String name, java.lang.String objectName, java.lang.String attribute)
           
 void addMeter(AbstractMeter probe)
           
 void addMeterGraph(MeterGraphInfo meterGraph)
           
 void addMeterGraphPage(MeterGraphPageInfo meterGraphPage)
           
 void addSample(long now, long[] sampleIds, double[] sampleData)
           
 void addSample(long now, long id, double data)
           
 void addSample(StatSystem.Sample sample)
           
static ProStatSystem createAndAddService()
           
 void destroy()
          Destroys the service.
 BaselineQueryResult getBaseline(long id, long beginTime, long endTime, int minSampleSize)
           
 BaselineQueryResult getBaseline(java.lang.String name, long beginTime, long endTime, int minSampleSize)
           
 double getCpuLoad()
           
 java.util.ArrayList<AbstractMeter> getCpuMeters()
           
 double getLastValue(long id)
           
 double getLastValue(java.lang.String name)
           
 AbstractMeter getMeter(java.lang.String name)
           
 MeterGraphPageInfo[] getMeterGraphPages()
           
 MeterGraphInfo[] getMeterGraphs()
           
 long getSamplePeriod()
          Returns the sample period
 int getStartPriority()
          Returns the start priority of the service, used to determine which services to start first.
 long[] getStartTimes(int index, long startTime, long endTime)
           
 StatServiceValue[] getStatisticsData(long id, long beginTime, long endTime, long step)
           
 StatServiceValue[] getStatisticsData(java.lang.String name, long beginTime, long endTime, long step)
           
 java.lang.String[] getStatisticsNames()
           
 void handleAlarm(Alarm alarm)
          Handles a callback from an alarm.
 void init()
           
 java.util.Set queryNames(java.lang.String objectName)
           
 void setSamplePeriod(Period period)
          Sets the sample period
 void start()
          Starts the service.
 void stop()
          Stops the service.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.server.admin.StatSystem
getCurrent
 
Methods inherited from class com.caucho.env.service.AbstractResinSubSystem
getStopPriority, preCreate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

START_PRIORITY

public static final int START_PRIORITY
See Also:
Constant Field Values
Method Detail

createAndAddService

public static ProStatSystem createAndAddService()

setSamplePeriod

public void setSamplePeriod(Period period)
Sets the sample period

Overrides:
setSamplePeriod in class StatSystem

getSamplePeriod

public long getSamplePeriod()
Returns the sample period

Overrides:
getSamplePeriod in class StatSystem

init

@PostConstruct
public void init()
Overrides:
init in class StatSystem

destroy

@PreDestroy
public void destroy()
Description copied from interface: ResinSubSystem
Destroys the service.

Specified by:
destroy in interface ResinSubSystem
Overrides:
destroy in class AbstractResinSubSystem

getStartPriority

public int getStartPriority()
Description copied from interface: ResinSubSystem
Returns the start priority of the service, used to determine which services to start first.

Specified by:
getStartPriority in interface ResinSubSystem
Overrides:
getStartPriority in class AbstractResinSubSystem

start

public void start()
Description copied from interface: ResinSubSystem
Starts the service.

Specified by:
start in interface ResinSubSystem
Overrides:
start in class AbstractResinSubSystem

getCpuMeters

public java.util.ArrayList<AbstractMeter> getCpuMeters()
Overrides:
getCpuMeters in class StatSystem

queryNames

public java.util.Set queryNames(java.lang.String objectName)
Overrides:
queryNames in class StatSystem

addJmxMeter

public void addJmxMeter(java.lang.String name,
                        java.lang.String objectName,
                        java.lang.String attribute)
Overrides:
addJmxMeter in class StatSystem

addJmx

public void addJmx(StatSystem.JmxItem item)
Overrides:
addJmx in class StatSystem

addJmxDelta

public void addJmxDelta(StatSystem.JmxItem item)
Overrides:
addJmxDelta in class StatSystem

addJmxDeltaMeter

public void addJmxDeltaMeter(java.lang.String name,
                             java.lang.String objectName,
                             java.lang.String attribute)
Overrides:
addJmxDeltaMeter in class StatSystem

addJmxPercentMeter

public void addJmxPercentMeter(java.lang.String name,
                               java.lang.String objectName,
                               java.lang.String attribute)
Overrides:
addJmxPercentMeter in class StatSystem

addAnalyzer

public void addAnalyzer(HealthAnalyzer analyzer)

addMeter

public void addMeter(AbstractMeter probe)
Overrides:
addMeter in class StatSystem

getMeter

public AbstractMeter getMeter(java.lang.String name)

addSample

public void addSample(StatSystem.Sample sample)
Overrides:
addSample in class StatSystem

stop

@PreDestroy
public void stop()
Description copied from interface: ResinSubSystem
Stops the service.

Specified by:
stop in interface ResinSubSystem
Overrides:
stop in class AbstractResinSubSystem

addSample

public void addSample(long now,
                      long id,
                      double data)
Overrides:
addSample in class StatSystem

addSample

public void addSample(long now,
                      long[] sampleIds,
                      double[] sampleData)
Overrides:
addSample in class StatSystem

getCpuLoad

public double getCpuLoad()
Overrides:
getCpuLoad in class StatSystem

handleAlarm

public void handleAlarm(Alarm alarm)
Description copied from interface: AlarmListener
Handles a callback from an alarm.

Specified by:
handleAlarm in interface AlarmListener

toString

public java.lang.String toString()
Overrides:
toString in class AbstractResinSubSystem

getStatisticsData

public StatServiceValue[] getStatisticsData(java.lang.String name,
                                            long beginTime,
                                            long endTime,
                                            long step)
Overrides:
getStatisticsData in class StatSystem

getStatisticsData

public StatServiceValue[] getStatisticsData(long id,
                                            long beginTime,
                                            long endTime,
                                            long step)
Overrides:
getStatisticsData in class StatSystem

getLastValue

public double getLastValue(java.lang.String name)
Overrides:
getLastValue in class StatSystem

getLastValue

public double getLastValue(long id)
Overrides:
getLastValue in class StatSystem

getBaseline

public BaselineQueryResult getBaseline(java.lang.String name,
                                       long beginTime,
                                       long endTime,
                                       int minSampleSize)
Overrides:
getBaseline in class StatSystem

getBaseline

public BaselineQueryResult getBaseline(long id,
                                       long beginTime,
                                       long endTime,
                                       int minSampleSize)
Overrides:
getBaseline in class StatSystem

getStatisticsNames

public java.lang.String[] getStatisticsNames()
Overrides:
getStatisticsNames in class StatSystem

addMeterGraph

public void addMeterGraph(MeterGraphInfo meterGraph)
Overrides:
addMeterGraph in class StatSystem

addMeterGraphPage

public void addMeterGraphPage(MeterGraphPageInfo meterGraphPage)
Overrides:
addMeterGraphPage in class StatSystem

getMeterGraphs

public MeterGraphInfo[] getMeterGraphs()
Overrides:
getMeterGraphs in class StatSystem

getMeterGraphPages

public MeterGraphPageInfo[] getMeterGraphPages()
Overrides:
getMeterGraphPages in class StatSystem

getStartTimes

public long[] getStartTimes(int index,
                            long startTime,
                            long endTime)
Overrides:
getStartTimes in class StatSystem