org.apache.excalibur.instrument.client
Interface InstrumentSampleElementData

All Superinterfaces:
Data, ElementData
All Known Subinterfaces:
InstrumentSampleData, InstrumentSampleSnapshotData

public interface InstrumentSampleElementData
extends ElementData


Field Summary
static int INSTRUMENT_SAMPLE_TYPE_COUNTER
          Type which identifies CounterInstrumentSamples.
static int INSTRUMENT_SAMPLE_TYPE_MAXIMUM
          Type which identifies MaximumInstrumentSamples.
static int INSTRUMENT_SAMPLE_TYPE_MEAN
          Type which identifies MeanInstrumentSamples.
static int INSTRUMENT_SAMPLE_TYPE_MINIMUM
          Type which identifies MinimumInstrumentSamples.
 
Method Summary
 int getInstrumentType()
          Returns the Type of the Instrument which can use the sample.
 long getInterval()
          Returns the sample interval.
 long getLeaseExpirationTime()
          Obtain the UNIX time when the lease expires.
 int getSize()
          Returns the number of samples in the sample history.
 long getTime()
          Obtain the UNIX time of the beginning of the sample.
 int getType()
          Returns the type of the Instrument Sample.
 int getValue()
          Obtain the value of the sample.
 
Methods inherited from interface org.apache.excalibur.instrument.client.ElementData
getName, getParent, isConfigured
 
Methods inherited from interface org.apache.excalibur.instrument.client.Data
getDescription, getStateVersion, update
 

Field Detail

INSTRUMENT_SAMPLE_TYPE_COUNTER

public static final int INSTRUMENT_SAMPLE_TYPE_COUNTER
Type which identifies CounterInstrumentSamples.

See Also:
Constant Field Values

INSTRUMENT_SAMPLE_TYPE_MINIMUM

public static final int INSTRUMENT_SAMPLE_TYPE_MINIMUM
Type which identifies MinimumInstrumentSamples.

See Also:
Constant Field Values

INSTRUMENT_SAMPLE_TYPE_MAXIMUM

public static final int INSTRUMENT_SAMPLE_TYPE_MAXIMUM
Type which identifies MaximumInstrumentSamples.

See Also:
Constant Field Values

INSTRUMENT_SAMPLE_TYPE_MEAN

public static final int INSTRUMENT_SAMPLE_TYPE_MEAN
Type which identifies MeanInstrumentSamples.

See Also:
Constant Field Values
Method Detail

getInterval

public long getInterval()
Returns the sample interval. The period of each sample in millisends.

Returns:
The sample interval.

getSize

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

Returns:
The size of the sample history.

getType

public int getType()
Returns the type of the Instrument Sample. Possible values include InstrumentSampleData.INSTRUMENT_SAMPLE_TYPE_COUNTER, InstrumentSampleData.INSTRUMENT_SAMPLE_TYPE_MAXIMUM, InstrumentSampleData.INSTRUMENT_SAMPLE_TYPE_MEAN, or InstrumentSampleData.INSTRUMENT_SAMPLE_TYPE_MINIMUM.

Returns:
The type of the Instrument Sample.

getValue

public int getValue()
Obtain the value of the sample. All samples are integers, so the profiled objects must measure quantity (numbers of items), rate (items/period), time in milliseconds, etc.

Returns:
The sample value.

getTime

public long getTime()
Obtain the UNIX time of the beginning of the sample.

Returns:
The UNIX time of the beginning of the sample.

getLeaseExpirationTime

public long getLeaseExpirationTime()
Obtain the UNIX time when the lease expires.

Returns:
The UNIX time when the lease expires.

getInstrumentType

public int getInstrumentType()
Returns the Type of the Instrument which can use the sample. This should be the same for all instances of a class.

Should be one of the following: InstrumentData.PROFILE_POINT_TYPE_COUNTER or InstrumentData.PROFILE_POINT_TYPE_VALUE

Returns:
The Type of the Instrument which can use the sample.


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