Interface Instrument
-
- All Known Subinterfaces:
JMXInstrument
- All Known Implementing Classes:
AbstractDataCacheInstrument,AbstractInstrument,AbstractPreparedQueryCacheInstrument,AbstractQueryCacheInstrument,DataCacheJMXInstrument,PreparedQueryCacheJMXInstrument,QueryCacheJMXInstrument
public interface InstrumentInterface that must be implemented by instruments.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectgetContext()Gets the context of the instrument.InstrumentationLevelgetLevel()Gets the instrumentation level of this instrument.StringgetName()Returns the name of the instrument.StringgetOptions()Returns the options specified for the instrument in string form.InstrumentationProvidergetProvider()Gets the instrumentation provider for the instrument.voidinitialize()Initializes the instrument.booleanisStarted()Returns true if the instrument is started.voidrestart()Restarts the instrument.voidsetContext(Object context)Sets the context of the instrument.voidsetOptions(String options)Sets options to specify for the instrument in standard string form.voidsetProvider(InstrumentationProvider provider)Sets the instrumentation provider for the instrument.voidsetStarted(boolean started)Sets whether the instrument is an available state.voidstart()Starts the instrument.voidstop()Starts the instrument.
-
-
-
Method Detail
-
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
void setOptions(String options)
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
void setContext(Object context)
Sets the context of the instrument. Typically, a reference to a broker or broker factory.
-
setProvider
void setProvider(InstrumentationProvider provider)
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.
-
-