Class JaxbServiceStatistics
java.lang.Object
org.opencastproject.serviceregistry.api.JaxbServiceStatistics
- All Implemented Interfaces:
ServiceStatistics
Statistics for a service registration.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe number of finished jobsprotected longThe mean queue time for jobsprotected longThe mean run time for jobsprotected intThe number of currently queued jobsprotected intThe number of currently running jobsprotected JaxbServiceRegistrationThe service registration -
Constructor Summary
ConstructorsConstructorDescriptionNo-arg constructor needed by JAXBJaxbServiceStatistics(JaxbServiceRegistration serviceRegistration) Constructs a new service statistics instance without statistics.JaxbServiceStatistics(JaxbServiceRegistration serviceRegistration, long meanRunTime, long meanQueueTime, int runningJobs, int queuedJobs, int finishedJobs) Constructs a new service statistics instance with statistics.JaxbServiceStatistics(ServiceRegistration serviceRegistration) Constructs a new service statistics instance without statistics. -
Method Summary
Modifier and TypeMethodDescriptionintThe number of jobs that this service has successfully finishedlongThe number of milliseconds a job sits in a queue, on averagelongThe number of milliseconds a job takes, on average, to runintThe number of job that are currently waiting to be run by this serviceintThe number of job that this service is currently runningThe service for which these statistics applyvoidsetFinishedJobs(int finishedJobs) Sets the number of finished jobsvoidsetMeanQueueTime(long meanQueueTime) Sets the mean queue time.voidsetMeanRunTime(long meanRunTime) Sets the mean run time.voidsetQueuedJobs(int queuedJobs) Sets the number of queued jobsvoidsetRunningJobs(int runningJobs) Sets the number of running jobs
-
Field Details
-
serviceRegistration
The service registration -
meanRunTime
protected long meanRunTimeThe mean run time for jobs -
meanQueueTime
protected long meanQueueTimeThe mean queue time for jobs -
finishedJobs
protected int finishedJobsThe number of finished jobs -
runningJobs
protected int runningJobsThe number of currently running jobs -
queuedJobs
protected int queuedJobsThe number of currently queued jobs
-
-
Constructor Details
-
JaxbServiceStatistics
public JaxbServiceStatistics()No-arg constructor needed by JAXB -
JaxbServiceStatistics
Constructs a new service statistics instance without statistics.- Parameters:
serviceRegistration- the service registration
-
JaxbServiceStatistics
Constructs a new service statistics instance without statistics.- Parameters:
serviceRegistration- the service registration
-
JaxbServiceStatistics
public JaxbServiceStatistics(JaxbServiceRegistration serviceRegistration, long meanRunTime, long meanQueueTime, int runningJobs, int queuedJobs, int finishedJobs) Constructs a new service statistics instance with statistics.- Parameters:
serviceRegistration- the service registrationmeanRunTime-meanQueueTime-runningJobs-queuedJobs-
-
-
Method Details
-
getMeanQueueTime
public long getMeanQueueTime()The number of milliseconds a job sits in a queue, on average- Specified by:
getMeanQueueTimein interfaceServiceStatistics- See Also:
-
setMeanQueueTime
public void setMeanQueueTime(long meanQueueTime) Sets the mean queue time.- Parameters:
meanQueueTime- the mean queue time
-
getMeanRunTime
public long getMeanRunTime()The number of milliseconds a job takes, on average, to run- Specified by:
getMeanRunTimein interfaceServiceStatistics- See Also:
-
setMeanRunTime
public void setMeanRunTime(long meanRunTime) Sets the mean run time.- Parameters:
meanRunTime- the mean run time.
-
getFinishedJobs
public int getFinishedJobs()The number of jobs that this service has successfully finished- Specified by:
getFinishedJobsin interfaceServiceStatistics- See Also:
-
setFinishedJobs
public void setFinishedJobs(int finishedJobs) Sets the number of finished jobs- Parameters:
finishedJobs- the number of finished jobs
-
getQueuedJobs
public int getQueuedJobs()The number of job that are currently waiting to be run by this service- Specified by:
getQueuedJobsin interfaceServiceStatistics- See Also:
-
setQueuedJobs
public void setQueuedJobs(int queuedJobs) Sets the number of queued jobs- Parameters:
queuedJobs- the number of queued jobs
-
getRunningJobs
public int getRunningJobs()The number of job that this service is currently running- Specified by:
getRunningJobsin interfaceServiceStatistics- See Also:
-
setRunningJobs
public void setRunningJobs(int runningJobs) Sets the number of running jobs- Parameters:
runningJobs- the number of running jobs
-
getServiceRegistration
The service for which these statistics apply- Specified by:
getServiceRegistrationin interfaceServiceStatistics- See Also:
-