Interface Instrument
- All Known Subinterfaces:
JMXInstrument
- All Known Implementing Classes:
AbstractDataCacheInstrument
,AbstractInstrument
,AbstractPreparedQueryCacheInstrument
,AbstractQueryCacheInstrument
,DataCacheJMXInstrument
,PreparedQueryCacheJMXInstrument
,QueryCacheJMXInstrument
public interface Instrument
Interface that must be implemented by instruments.
-
Method Summary
Modifier and TypeMethodDescriptionGets the context of the instrument.getLevel()
Gets the instrumentation level of this instrument.getName()
Returns the name of the instrument.Returns the options specified for the instrument in string form.Gets the instrumentation provider for the instrument.void
Initializes the instrument.boolean
Returns true if the instrument is started.void
restart()
Restarts the instrument.void
setContext
(Object context) Sets the context of the instrument.void
setOptions
(String options) Sets options to specify for the instrument in standard string form.void
setProvider
(InstrumentationProvider provider) Sets the instrumentation provider for the instrument.void
setStarted
(boolean started) Sets whether the instrument is an available state.void
start()
Starts the instrument.void
stop()
Starts the instrument.
-
Method Details
-
getName
String getName()Returns the name of the instrument. Must be unique per-provider. -
getOptions
String getOptions()Returns the options specified for the instrument in string form.- Returns:
- options configuration options for the instrument
-
setOptions
Sets options to specify for the instrument in standard string form. ex. DataCache(Options='Start=true')- Parameters:
options
- options
-
getContext
Object getContext()Gets the context of the instrument. Typically, a reference to a broker or broker factory.- Returns:
- the context associated with the instrument.
-
setContext
Sets the context of the instrument. Typically, a reference to a broker or broker factory. -
setProvider
Sets the instrumentation provider for the instrument.- Parameters:
provider
- instrumentation provider of the instrument
-
getProvider
InstrumentationProvider getProvider()Gets the instrumentation provider for the instrument.- Returns:
- instrumentation provider of the instrument
-
initialize
void initialize()Initializes the instrument. Depending on the instrument, the provider, options, and various options may need to be set before calling this method. -
getLevel
InstrumentationLevel getLevel()Gets the instrumentation level of this instrument. The instrumentation level determines if and when the instrument will automatically start and stop.- Returns:
- the instrumentation level of the instrument
-
isStarted
boolean isStarted()Returns true if the instrument is started. -
setStarted
void setStarted(boolean started) Sets whether the instrument is an available state.- Parameters:
started
-
-
start
void start()Starts the instrument. Typically this will be performed through the provider, but in some cases an instrument will have its own specialized startup. -
stop
void stop()Starts the instrument. Typically this will be performed through the provider, but in some cases an instrument will have its own specialized shutdown. -
restart
void restart()Restarts the instrument. Typically this will be performed through the provider, but in some cases an instrument will have its own specialized restart.
-