org.apache.openjpa.instrumentation.jmx
Class PreparedQueryCacheJMXInstrument

java.lang.Object
  extended by org.apache.openjpa.lib.instrumentation.AbstractInstrument
      extended by org.apache.openjpa.instrumentation.AbstractPreparedQueryCacheInstrument
          extended by org.apache.openjpa.instrumentation.jmx.PreparedQueryCacheJMXInstrument
All Implemented Interfaces:
JMXInstrument, PreparedQueryCacheJMXInstrumentMBean, PreparedQueryCacheInstrument, Instrument

public class PreparedQueryCacheJMXInstrument
extends AbstractPreparedQueryCacheInstrument
implements JMXInstrument, PreparedQueryCacheJMXInstrumentMBean

A JMX-specific instrument for the query cache


Field Summary
 
Fields inherited from class org.apache.openjpa.instrumentation.AbstractPreparedQueryCacheInstrument
NO_STATS
 
Constructor Summary
PreparedQueryCacheJMXInstrument()
           
 
Method Summary
 InstrumentationLevel getLevel()
          Gets the instrumentation level of this instrument.
 String getName()
          Returns the name of the instrument.
 ObjectName getObjectName()
          Returns the JMX object name for the instrument
 void initialize()
          Initializes the instrument.
 void start()
          Starts the instrument.
 void stop()
          Starts the instrument.
 
Methods inherited from class org.apache.openjpa.instrumentation.AbstractPreparedQueryCacheInstrument
getConfigId, getContextRef, getExecutionCount, getExecutionCount, getHitCount, getHitCount, getTotalExecutionCount, getTotalExecutionCount, getTotalHitCount, getTotalHitCount, queries, reset, setConfigId, setContextRef, setPreparedQueryCache, sinceDate, startDate
 
Methods inherited from class org.apache.openjpa.lib.instrumentation.AbstractInstrument
getContext, getOptions, getProvider, isStarted, restart, setContext, setOptions, setProvider, setStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.openjpa.instrumentation.jmx.JMXInstrument
getConfigId, getContextRef, setConfigId, setContextRef
 
Methods inherited from interface org.apache.openjpa.lib.instrumentation.Instrument
getContext, getOptions, getProvider, isStarted, restart, setContext, setOptions, setProvider, setStarted
 
Methods inherited from interface org.apache.openjpa.instrumentation.PreparedQueryCacheInstrument
getExecutionCount, getExecutionCount, getHitCount, getHitCount, getTotalExecutionCount, getTotalExecutionCount, getTotalHitCount, getTotalHitCount, queries, reset, sinceDate, startDate
 

Constructor Detail

PreparedQueryCacheJMXInstrument

public PreparedQueryCacheJMXInstrument()
Method Detail

getName

public String getName()
Description copied from interface: Instrument
Returns the name of the instrument. Must be unique per-provider.

Specified by:
getName in interface Instrument
Specified by:
getName in class AbstractInstrument

getLevel

public InstrumentationLevel getLevel()
Description copied from interface: Instrument
Gets the instrumentation level of this instrument. The instrumentation level determines if and when the instrument will automatically start and stop.

Specified by:
getLevel in interface Instrument
Overrides:
getLevel in class AbstractPreparedQueryCacheInstrument
Returns:
the instrumentation level of the instrument

initialize

public void initialize()
Description copied from interface: Instrument
Initializes the instrument. Depending on the instrument, the provider, options, and various options may need to be set before calling this method.

Specified by:
initialize in interface Instrument
Specified by:
initialize in class AbstractInstrument

getObjectName

public ObjectName getObjectName()
Description copied from interface: JMXInstrument
Returns the JMX object name for the instrument

Specified by:
getObjectName in interface JMXInstrument
Returns:

start

public void start()
Description copied from interface: Instrument
Starts the instrument. Typically this will be performed through the provider, but in some cases an instrument will have its own specialized startup.

Specified by:
start in interface Instrument

stop

public void stop()
Description copied from interface: Instrument
Starts the instrument. Typically this will be performed through the provider, but in some cases an instrument will have its own specialized shutdown.

Specified by:
stop in interface Instrument


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.