|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.server.RealTimeJobStats
This class defines a data type that will be used to hold real-time stat data for a particular job. Note that this class is not thread safe, so it is assumed that whatever is using it performs adequate locking to ensure proper safety.
| Constructor Summary | |
RealTimeJobStats(RealTimeStatHandler statHandler,
java.lang.String jobID,
int maxIntervals)
Creates a new stat data handler for the specified job. |
|
| Method Summary | |
void |
deregisterStatistic()
Deregisters a stat reporder from this stat handler. |
int |
getFirstInterval(java.lang.String statName)
Retrieves the interval number of the first interval available for the specified statistic. |
Job |
getJob()
Retrieves the job with which this handler is associated. |
java.lang.String |
getJobID()
Retrieves the job ID with which this handler is associated. |
long |
getLastUpdateTime()
Retrieves the time that this data was last updated. |
java.lang.String[] |
getStatNames()
Retrieves the display names of the statistics that are available in this stat handler. |
double[] |
getStatValues(java.lang.String statName)
Retrieves the data currently available for the specified statistic. |
void |
registerStatistic(java.lang.String statName)
Registers the specified statistic with this stat handler. |
void |
setLastUpdateTime()
Indicates that the lastUpdateTime should be set to the current time. |
void |
updateStatToAdd(java.lang.String statName,
int intervalNumber,
double value)
Updates the data for the specified statistic to indicate that the provided value should be added to the existing data for the specified interval. |
void |
updateStatToAverage(java.lang.String statName,
int intervalNumber,
double value)
Updates the data for the specified statistic to indicate that the provided value should be averaged with the existing data for the specified interval. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RealTimeJobStats(RealTimeStatHandler statHandler,
java.lang.String jobID,
int maxIntervals)
throws SLAMDServerException
statHandler - The real-time stat handler that associated with this
stat data handler.jobID - The job ID with which this stat handler is
associated.maxIntervals - The maximum number of collection intervals to
retain.
SLAMDServerException - If the specified job is unknown to the
SLAMD server.| Method Detail |
public java.lang.String getJobID()
public Job getJob()
public java.lang.String[] getStatNames()
public double[] getStatValues(java.lang.String statName)
statName - The name of the statistic for which to retrieve the
data.
null if no data is available for the specified
statistic.public int getFirstInterval(java.lang.String statName)
statName - The name of the statistic for which to retrieve the
data.
public void registerStatistic(java.lang.String statName)
statName - The name of the statistic being registered.public void deregisterStatistic()
public void updateStatToAdd(java.lang.String statName,
int intervalNumber,
double value)
statName - The name of the statistic to update.intervalNumber - The interval number with which the value is
associated.value - The value to be added to the existing values for
the given interval.
public void updateStatToAverage(java.lang.String statName,
int intervalNumber,
double value)
statName - The name of the statistic to update.intervalNumber - The interval number with which the value is
associated.value - The value to be averaged with the existing values
for the given interval.public void setLastUpdateTime()
public long getLastUpdateTime()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||