public class ScheduledTaskStatisticsImpl extends Object implements ScheduledTaskStatistics, TaskLifecycleListener
| Constructor and Description | 
|---|
| ScheduledTaskStatisticsImpl() | 
| ScheduledTaskStatisticsImpl(long runs,
                           long firstRunStartNanos,
                           long lastRunStartNanos,
                           long lastRunEndNanos,
                           long lastIdleTimeNanos,
                           long totalRunTimeNanos,
                           long totalIdleTimeNanos) | 
| ScheduledTaskStatisticsImpl(ScheduledTaskStatistics copy) | 
| Modifier and Type | Method and Description | 
|---|---|
| long | getCreatedAtNanos() | 
| int | getFactoryId()Returns DataSerializableFactory factory id for this class. | 
| long | getFirstRunStartNanos() | 
| int | getId()Returns type identifier for this class. | 
| long | getLastIdleTime(TimeUnit unit)Returns the last period of time the task was idle, waiting to get scheduled | 
| long | getLastRunDuration(TimeUnit unit)Returns the duration of the task's last execution. | 
| long | getLastRunEndNanos() | 
| long | getLastRunStartNanos() | 
| long | getTotalIdleTime(TimeUnit unit)Returns the total amount of time the task was idle, waiting to get scheduled in. | 
| long | getTotalRuns()Returns how many times the task was ran/called. | 
| long | getTotalRunTime(TimeUnit unit)Returns the total amount of time the task spent while scheduled in. | 
| void | onAfterRun() | 
| void | onBeforeRun() | 
| void | readData(ObjectDataInput in)Reads fields from the input stream | 
| ScheduledTaskStatisticsImpl | snapshot() | 
| String | toString() | 
| void | writeData(ObjectDataOutput out)Writes object fields to output stream | 
public ScheduledTaskStatisticsImpl()
public ScheduledTaskStatisticsImpl(ScheduledTaskStatistics copy)
public ScheduledTaskStatisticsImpl(long runs,
                                   long firstRunStartNanos,
                                   long lastRunStartNanos,
                                   long lastRunEndNanos,
                                   long lastIdleTimeNanos,
                                   long totalRunTimeNanos,
                                   long totalIdleTimeNanos)
public long getTotalRuns()
ScheduledTaskStatisticsgetTotalRuns in interface ScheduledTaskStatisticspublic long getCreatedAtNanos()
getCreatedAtNanos in interface ScheduledTaskStatisticspublic long getFirstRunStartNanos()
getFirstRunStartNanos in interface ScheduledTaskStatisticspublic long getLastRunStartNanos()
getLastRunStartNanos in interface ScheduledTaskStatisticspublic long getLastRunEndNanos()
getLastRunEndNanos in interface ScheduledTaskStatisticspublic long getLastRunDuration(TimeUnit unit)
ScheduledTaskStatisticsgetLastRunDuration in interface ScheduledTaskStatisticsunit - The time unit to return the duration in.public long getLastIdleTime(TimeUnit unit)
ScheduledTaskStatisticsgetLastIdleTime in interface ScheduledTaskStatisticsunit - The time unit to return the duration in.public long getTotalIdleTime(TimeUnit unit)
ScheduledTaskStatisticsgetTotalIdleTime in interface ScheduledTaskStatisticsunit - The time unit to return the duration in.public long getTotalRunTime(TimeUnit unit)
ScheduledTaskStatisticsgetTotalRunTime in interface ScheduledTaskStatisticsunit - The time unit to return the duration in.public int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializablepublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - outputIOExceptionpublic void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablein - inputIOExceptionpublic void onBeforeRun()
onBeforeRun in interface TaskLifecycleListenerpublic void onAfterRun()
onAfterRun in interface TaskLifecycleListenerpublic ScheduledTaskStatisticsImpl snapshot()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.