Package com.levigo.jadice.server.core
Class ServerStatistics
- java.lang.Object
-
- com.levigo.jadice.server.core.ServerStatistics
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.Lifecycle
,org.springframework.jmx.export.naming.SelfNaming
,org.springframework.jmx.export.notification.NotificationPublisherAware
@ManagedResource(description="Statistics about jadice server\'s performance") public class ServerStatistics extends Object implements org.springframework.context.Lifecycle, org.springframework.jmx.export.naming.SelfNaming, org.springframework.jmx.export.notification.NotificationPublisherAware
-
-
Constructor Summary
Constructors Constructor Description ServerStatistics()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearEfficiency()
void
clearExecutionTimes()
void
clearJobRates()
void
dumpStatistics()
long
getAverageExecutionTime()
long
getCompletedTaskCount()
float
getEfficiency10Min()
float
getEfficiency1Day()
float
getEfficiency1Hour()
ObjectName
getObjectName()
float
getRecentAbortRate()
long
getRecentAverageExecutionTime()
float
getRecentFailureRate()
long
getRecentMaximumExecutionTime()
long
getRecentMinimumExecutionTime()
float
getTotalAbortRate()
float
getTotalFailureRate()
long
getUptime()
boolean
isRunning()
void
notifyStateChanged(ServerJob serverJob, Job.State state)
void
reset()
void
setConcurrentJobs(int size)
void
setNotificationPublisher(org.springframework.jmx.export.notification.NotificationPublisher notificationPublisher)
static List<String>
sortByDominators(SortedMap<String,JobStateRecorder> jobStatistics)
void
start()
void
stop()
-
-
-
Method Detail
-
setConcurrentJobs
public void setConcurrentJobs(int size)
-
getRecentAbortRate
@ManagedAttribute public float getRecentAbortRate()
-
getRecentAverageExecutionTime
@ManagedAttribute(description="The average execution time for the last 10 jobs") public long getRecentAverageExecutionTime()
-
getRecentFailureRate
@ManagedAttribute public float getRecentFailureRate()
-
getRecentMaximumExecutionTime
@ManagedAttribute(description="The maximum execution time for the last 10 jobs") public long getRecentMaximumExecutionTime()
-
getRecentMinimumExecutionTime
@ManagedAttribute(description="The minimum execution time for the last 10 jobs") public long getRecentMinimumExecutionTime()
-
getTotalAbortRate
@ManagedAttribute public float getTotalAbortRate()
-
getTotalFailureRate
@ManagedAttribute public float getTotalFailureRate()
-
clearEfficiency
@ManagedOperation(description="Clear all statistical data about effiency") public void clearEfficiency()
-
clearExecutionTimes
@ManagedOperation(description="Clear all statistical data about execution times") public void clearExecutionTimes()
-
clearJobRates
@ManagedOperation(description="Clear all statistical data about job finish states") public void clearJobRates()
-
getEfficiency10Min
@ManagedAttribute(description="Efficiency of the server within last ten minutes (Unit: Erlang)") public float getEfficiency10Min()
-
getEfficiency1Day
@ManagedAttribute(description="Efficiency of the server within 24 hours (Unit: Erlang)") public float getEfficiency1Day()
-
getEfficiency1Hour
@ManagedAttribute(description="Efficiency of the server within last hour (Unit: Erlang)") public float getEfficiency1Hour()
-
setNotificationPublisher
public void setNotificationPublisher(org.springframework.jmx.export.notification.NotificationPublisher notificationPublisher)
- Specified by:
setNotificationPublisher
in interfaceorg.springframework.jmx.export.notification.NotificationPublisherAware
-
getAverageExecutionTime
@ManagedAttribute(description="The average execution time for jobs") public long getAverageExecutionTime()
-
reset
public void reset()
-
getCompletedTaskCount
@ManagedAttribute(description="Number of completed jobs") public long getCompletedTaskCount()
-
getUptime
@ManagedAttribute(description="Uptime [ms]") public long getUptime()
-
dumpStatistics
@ManagedOperation(description="Dump current statistics into server log") public void dumpStatistics()
-
start
public void start()
- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()
- Specified by:
stop
in interfaceorg.springframework.context.Lifecycle
-
isRunning
public boolean isRunning()
- Specified by:
isRunning
in interfaceorg.springframework.context.Lifecycle
-
getObjectName
public ObjectName getObjectName() throws MalformedObjectNameException
- Specified by:
getObjectName
in interfaceorg.springframework.jmx.export.naming.SelfNaming
- Throws:
MalformedObjectNameException
-
sortByDominators
public static List<String> sortByDominators(SortedMap<String,JobStateRecorder> jobStatistics)
-
-