public interface InstrumentDescriptor
| Modifier and Type | Method and Description |
|---|---|
void |
addCounterInstrumentListener(CounterInstrumentListener listener)
Adds a CounterInstrumentListener to the list of listeners which will
receive updates of the value of the Instrument.
|
void |
addValueInstrumentListener(ValueInstrumentListener listener)
Adds a ValueInstrumentListener to the list of listeners which will
receive updates of the value of the Instrument.
|
InstrumentSampleDescriptor |
createInstrumentSample(java.lang.String sampleDescription,
long sampleInterval,
int sampleSize,
long sampleLease,
int sampleType)
Returns a InstrumentSampleDescriptor based on its name.
|
java.lang.String |
getDescription()
Gets the description of the Instrument.
|
InstrumentableDescriptor |
getInstrumentableDescriptor()
Returns a reference to the descriptor of the Instrumentable of the
instrument.
|
InstrumentSampleDescriptor |
getInstrumentSampleDescriptor(java.lang.String instrumentSampleName)
Returns a InstrumentSampleDescriptor based on its name.
|
InstrumentSampleDescriptor[] |
getInstrumentSampleDescriptors()
Returns an array of Descriptors for the InstrumentSamples configured for this
Instrument.
|
java.lang.String |
getName()
Gets the name for the Instrument.
|
int |
getStateVersion()
Returns the stateVersion of the instrument.
|
int |
getType()
Returns the type of the Instrument.
|
boolean |
isConfigured()
Returns true if the Instrument was configured in the instrumentables
section of the configuration.
|
boolean |
isRegistered()
Returns true if the Instrument was registered with the Instrument
Manager.
|
void |
removeCounterInstrumentListener(CounterInstrumentListener listener)
Removes a InstrumentListener from the list of listeners which will
receive profile events.
|
void |
removeValueInstrumentListener(ValueInstrumentListener listener)
Removes a InstrumentListener from the list of listeners which will
receive profile events.
|
boolean isConfigured()
boolean isRegistered()
java.lang.String getName()
java.lang.String getDescription()
int getType()
InstrumentableDescriptor getInstrumentableDescriptor()
void addCounterInstrumentListener(CounterInstrumentListener listener)
listener - CounterInstrumentListener which will start receiving
profile updates.java.lang.IllegalStateException - If the Instrument's type is not
DefaultInstrumentManager.INSTRUMENT_TYPE_COUNTER.void removeCounterInstrumentListener(CounterInstrumentListener listener)
listener - InstrumentListener which will stop receiving profile
events.java.lang.IllegalStateException - If the Instrument's type is not
DefaultInstrumentManager.PROFILE_POINT_TYPE_COUNTER.void addValueInstrumentListener(ValueInstrumentListener listener)
listener - ValueInstrumentListener which will start receiving
profile updates.java.lang.IllegalStateException - If the Instrument's type is not
DefaultInstrumentManager.INSTRUMENT_TYPE_VALUE.void removeValueInstrumentListener(ValueInstrumentListener listener)
listener - InstrumentListener which will stop receiving profile
events.java.lang.IllegalStateException - If the Instrument's type is not
DefaultInstrumentManager.INSTRUMENT_TYPE_VALUE.InstrumentSampleDescriptor getInstrumentSampleDescriptor(java.lang.String instrumentSampleName) throws NoSuchInstrumentSampleException
instrumentSampleName - Name of the InstrumentSample being requested.NoSuchInstrumentSampleException - If the specified InstrumentSample
does not exist.InstrumentSampleDescriptor createInstrumentSample(java.lang.String sampleDescription, long sampleInterval, int sampleSize, long sampleLease, int sampleType)
sampleDescription - Description to assign to the new Sample.sampleInterval - Sample interval to use in the new Sample.sampleLease - Requested lease time for the new Sample in
milliseconds. The InstrumentManager may grant a
lease which is shorter or longer than the requested
period.sampleType - Type of sample to request. Must be one of the
following: DefaultInstrumentManager.INSTRUMENT_SAMPLE_TYPE_COUNTER,
DefaultInstrumentManager.INSTRUMENT_SAMPLE_TYPE_MINIMUM,
DefaultInstrumentManager.INSTRUMENT_SAMPLE_TYPE_MAXIMUM,
DefaultInstrumentManager.INSTRUMENT_SAMPLE_TYPE_MEAN.InstrumentSampleDescriptor[] getInstrumentSampleDescriptors()
int getStateVersion()