com.caucho.server.admin
Class StatSystem

java.lang.Object
  extended by com.caucho.env.service.AbstractResinSubSystem
      extended by com.caucho.server.admin.StatSystem
All Implemented Interfaces:
ResinSubSystem
Direct Known Subclasses:
ProStatSystem

@Service
public class StatSystem
extends AbstractResinSubSystem


Nested Class Summary
static class StatSystem.JmxItem
           
protected static class StatSystem.Sample
           
 
Field Summary
 
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
 
Constructor Summary
protected StatSystem()
           
 
Method Summary
 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)
           
 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()
           
static StatSystem getCurrent()
           
 double getLastValue(long id)
           
 double getLastValue(java.lang.String name)
           
 MeterGraphPageInfo[] getMeterGraphPages()
           
 MeterGraphInfo[] getMeterGraphs()
           
 long getSamplePeriod()
           
 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 init()
           
 java.util.Set queryNames(java.lang.String objectName)
           
 void setSamplePeriod(Period period)
           
 
Methods inherited from class com.caucho.env.service.AbstractResinSubSystem
destroy, getStartPriority, getStopPriority, preCreate, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatSystem

protected StatSystem()
Method Detail

getCurrent

public static StatSystem getCurrent()

init

@PostConstruct
public void init()

setSamplePeriod

public void setSamplePeriod(Period period)

getSamplePeriod

public long getSamplePeriod()

queryNames

public java.util.Set queryNames(java.lang.String objectName)

addJmxMeter

public void addJmxMeter(java.lang.String name,
                        java.lang.String objectName,
                        java.lang.String attribute)

addJmx

public void addJmx(StatSystem.JmxItem item)

addJmxDelta

public void addJmxDelta(StatSystem.JmxItem item)

addJmxDeltaMeter

public void addJmxDeltaMeter(java.lang.String name,
                             java.lang.String objectName,
                             java.lang.String attribute)

addJmxPercentMeter

public void addJmxPercentMeter(java.lang.String name,
                               java.lang.String objectName,
                               java.lang.String attribute)

addMeter

public void addMeter(AbstractMeter probe)

addSample

public void addSample(StatSystem.Sample sample)

addSample

public void addSample(long now,
                      long id,
                      double data)

addSample

public void addSample(long now,
                      long[] sampleIds,
                      double[] sampleData)

getCpuLoad

public double getCpuLoad()

getStatisticsData

public StatServiceValue[] getStatisticsData(java.lang.String name,
                                            long beginTime,
                                            long endTime,
                                            long step)

getStatisticsData

public StatServiceValue[] getStatisticsData(long id,
                                            long beginTime,
                                            long endTime,
                                            long step)

getLastValue

public double getLastValue(java.lang.String name)

getLastValue

public double getLastValue(long id)

getBaseline

public BaselineQueryResult getBaseline(java.lang.String name,
                                       long beginTime,
                                       long endTime,
                                       int minSampleSize)

getBaseline

public BaselineQueryResult getBaseline(long id,
                                       long beginTime,
                                       long endTime,
                                       int minSampleSize)

getStatisticsNames

public java.lang.String[] getStatisticsNames()

addMeterGraph

public void addMeterGraph(MeterGraphInfo meterGraph)

addMeterGraphPage

public void addMeterGraphPage(MeterGraphPageInfo meterGraphPage)

getMeterGraphs

public MeterGraphInfo[] getMeterGraphs()

getMeterGraphPages

public MeterGraphPageInfo[] getMeterGraphPages()

getStartTimes

public long[] getStartTimes(int index,
                            long startTime,
                            long endTime)

getCpuMeters

public java.util.ArrayList<AbstractMeter> getCpuMeters()