org.apache.excalibur.instrument.manager
Class InstrumentSampleSnapshot

java.lang.Object
  extended byorg.apache.excalibur.instrument.manager.InstrumentSampleSnapshot
All Implemented Interfaces:
java.io.Serializable

public class InstrumentSampleSnapshot
extends java.lang.Object
implements java.io.Serializable

Author:
Avalon Development Team
See Also:
Serialized Form

Constructor Summary
InstrumentSampleSnapshot(java.lang.String InstrumentSampleName, long interval, int size, long time, int[] samples, int stateVersion)
           
 
Method Summary
 java.lang.String getInstrumentSampleName()
          Returns the name used to reference the InstrumentSample.
 long getInterval()
          Returns the interval, in milliseconds, between each sample.
 int[] getSamples()
          Returns the samples as an array of integers.
 int getSize()
          Returns the number of samples in the InstrumentSample.
 int getStateVersion()
          Returns the stateVersion of the sample.
 long getTime()
          Returns the time that the last sample starts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstrumentSampleSnapshot

public InstrumentSampleSnapshot(java.lang.String InstrumentSampleName,
                                long interval,
                                int size,
                                long time,
                                int[] samples,
                                int stateVersion)
Parameters:
InstrumentSampleName - The name used to reference the InstrumentSample.
interval - The interval between each sample.
size - The number of samples in the InstrumentSample.
time - The time that the last sample starts.
samples - The samples as an array of integers.
stateVersion - The current state version of the sample.
Method Detail

getInstrumentSampleName

public java.lang.String getInstrumentSampleName()
Returns the name used to reference the InstrumentSample.

Returns:
The name used to reference the InstrumentSample.

getInterval

public long getInterval()
Returns the interval, in milliseconds, between each sample.

Returns:
The interval between each sample.

getSize

public int getSize()
Returns the number of samples in the InstrumentSample.

Returns:
The number of samples in the InstrumentSample.

getTime

public long getTime()
Returns the time that the last sample starts.

Returns:
The time that the last sample starts.

getSamples

public int[] getSamples()
Returns the samples as an array of integers. The sample at index 0 will be the oldest. The end of the array is the newest.

Returns:
The samples as an array of integers.

getStateVersion

public int getStateVersion()
Returns the stateVersion of the sample. The state version will be incremented each time any of the configuration of the sample is modified. Clients can use this value to tell whether or not anything has changed without having to do an exhaustive comparison.

Returns:
The state version of the sample.


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.