org.apache.excalibur.instrument.manager
Class InstrumentSampleSnapshot

java.lang.Object
  extended by org.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

Field Summary
private  java.lang.String m_InstrumentSampleName
          The name used to reference the InstrumentSample.
private  long m_interval
          The interval between each sample.
private  int[] m_samples
          The samples as an array of integers.
private  int m_size
          The number of samples in the InstrumentSample.
private  int m_stateVersion
          State Version.
private  long m_time
          The time that the last sample starts.
(package private) static long serialVersionUID
           
 
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
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

m_InstrumentSampleName

private java.lang.String m_InstrumentSampleName
The name used to reference the InstrumentSample.


m_interval

private long m_interval
The interval between each sample.


m_size

private int m_size
The number of samples in the InstrumentSample.


m_time

private long m_time
The time that the last sample starts.


m_samples

private int[] m_samples
The samples as an array of integers.


m_stateVersion

private int m_stateVersion
State Version.

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.