|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.excalibur.instrument.manager.impl.DefaultInstrumentManagerImpl
Field Summary |
Fields inherited from interface org.apache.excalibur.instrument.manager.DefaultInstrumentManager |
INSTRUMENT_SAMPLE_TYPE_COUNTER, INSTRUMENT_SAMPLE_TYPE_MAXIMUM, INSTRUMENT_SAMPLE_TYPE_MEAN, INSTRUMENT_SAMPLE_TYPE_MINIMUM, INSTRUMENT_TYPE_COUNTER, INSTRUMENT_TYPE_NONE, INSTRUMENT_TYPE_VALUE |
Fields inherited from interface org.apache.excalibur.instrument.InstrumentManager |
ROLE |
Fields inherited from interface org.apache.excalibur.instrument.Instrumentable |
EMPTY_INSTRUMENT_ARRAY, EMPTY_INSTRUMENTABLE_ARRAY |
Constructor Summary | |
DefaultInstrumentManagerImpl()
Creates a new DefaultInstrumentManagerImpl. |
|
DefaultInstrumentManagerImpl(java.lang.String name)
Deprecated. Name should be set in the instrument configuration file. |
Method Summary | |
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
Initializes the configured instrumentables. |
void |
dispose()
Disposes the InstrumentManager. |
org.apache.excalibur.instrument.Instrumentable[] |
getChildInstrumentables()
Any Object which implements Instrumentable can also make use of other Instrumentable child objects. |
java.lang.String |
getDescription()
Returns the description of this DefaultInstrumentManager. |
org.apache.excalibur.instrument.manager.InstrumentableDescriptor |
getInstrumentableDescriptor(java.lang.String instrumentableName)
Returns a InstrumentableDescriptor based on its name or the name of any of its children. |
org.apache.excalibur.instrument.manager.InstrumentableDescriptor[] |
getInstrumentableDescriptors()
Returns an array of Descriptors for the Instrumentables managed by this DefaultInstrumentManager. |
java.lang.String |
getInstrumentableName()
Gets the name of the Instrumentable. |
org.apache.excalibur.instrument.Instrument[] |
getInstruments()
Obtain a reference to all the Instruments that the Instrumentable object wishes to expose. |
int |
getLeaseSampleCount()
Returns the current number of leased samples. |
long |
getMaxLeasedSampleLease()
Returns the maximum number of milliseconds that a lease will be granted for. |
int |
getMaxLeasedSamples()
Returns the maximum number of leased samples that will be approved. |
int |
getMaxLeasedSampleSize()
Returns the maximum size of a leased sample. |
java.lang.String |
getName()
Returns the name used to identify this DefaultInstrumentManager. |
int |
getStateVersion()
Returns the stateVersion of the DefaultInstrumeManager. |
void |
initialize()
Initializes the InstrumentManager. |
void |
invokeGarbageCollection()
Invokes garbage collection. |
void |
loadStateFromConfiguration(org.apache.avalon.framework.configuration.Configuration state)
Loads the Instrument Manager state from the specified Configuration. |
void |
loadStateFromFile(java.io.File stateFile)
Loads the Instrument Manager state from the specified file. |
void |
loadStateFromStream(java.io.InputStream is)
Loads the Instrument Manager state from the specified stream. |
org.apache.excalibur.instrument.manager.InstrumentableDescriptor |
locateInstrumentableDescriptor(java.lang.String instrumentableName)
Searches the entire instrument tree for an instrumentable with the given name. |
org.apache.excalibur.instrument.manager.InstrumentDescriptor |
locateInstrumentDescriptor(java.lang.String instrumentName)
Searches the entire instrument tree for an instrument with the given name. |
org.apache.excalibur.instrument.manager.InstrumentSampleDescriptor |
locateInstrumentSampleDescriptor(java.lang.String sampleName)
Searches the entire instrument tree for an instrument sample with the given name. |
void |
registerInstrumentable(org.apache.excalibur.instrument.Instrumentable instrumentable,
java.lang.String instrumentableName)
Instrumentable to be registered with the instrument manager. |
void |
run()
|
void |
saveStateToFile(java.io.File stateFile)
Saves the Instrument Manager's state to the specified file. |
void |
saveStateToStream(java.io.OutputStream os)
Saves the Instrument Manager's state to the specified output stream. |
void |
setInstrumentableName(java.lang.String name)
Sets the name for the Instrumentable. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultInstrumentManagerImpl(java.lang.String name)
name
- The name used to identify this InstrumentManager. Should not
contain any spaces or periods.public DefaultInstrumentManagerImpl()
Method Detail |
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
configuration
- InstrumentManager configuration.
org.apache.avalon.framework.configuration.ConfigurationException
- If there are any configuration problems.public void initialize() throws java.lang.Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
java.lang.Exception
- If there were any problems initializing the object.public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
public void registerInstrumentable(org.apache.excalibur.instrument.Instrumentable instrumentable, java.lang.String instrumentableName) throws java.lang.Exception
registerInstrumentable
in interface org.apache.excalibur.instrument.InstrumentManager
instrumentable
- Instrumentable to register with the InstrumentManager.instrumentableName
- The name to use when registering the Instrumentable.
java.lang.Exception
- If there were any problems registering the Instrumentable.public java.lang.String getName()
getName
in interface org.apache.excalibur.instrument.manager.DefaultInstrumentManager
public java.lang.String getDescription()
getDescription
in interface org.apache.excalibur.instrument.manager.DefaultInstrumentManager
public org.apache.excalibur.instrument.manager.InstrumentableDescriptor getInstrumentableDescriptor(java.lang.String instrumentableName) throws org.apache.excalibur.instrument.manager.NoSuchInstrumentableException
getInstrumentableDescriptor
in interface org.apache.excalibur.instrument.manager.DefaultInstrumentManager
instrumentableName
- Name of the Instrumentable being requested.
org.apache.excalibur.instrument.manager.NoSuchInstrumentableException
- If the specified Instrumentable
does not exist.public org.apache.excalibur.instrument.manager.InstrumentableDescriptor[] getInstrumentableDescriptors()
getInstrumentableDescriptors
in interface org.apache.excalibur.instrument.manager.DefaultInstrumentManager
public org.apache.excalibur.instrument.manager.InstrumentableDescriptor locateInstrumentableDescriptor(java.lang.String instrumentableName) throws org.apache.excalibur.instrument.manager.NoSuchInstrumentableException
locateInstrumentableDescriptor
in interface org.apache.excalibur.instrument.manager.DefaultInstrumentManager
instrumentableName
- Name of the Instrumentable being requested.
org.apache.excalibur.instrument.manager.NoSuchInstrumentableException
- If the specified Instrumentable
does not exist.public org.apache.excalibur.instrument.manager.InstrumentDescriptor locateInstrumentDescriptor(java.lang.String instrumentName) throws org.apache.excalibur.instrument.manager.NoSuchInstrumentException
locateInstrumentDescriptor
in interface org.apache.excalibur.instrument.manager.DefaultInstrumentManager
instrumentName
- Name of the Instrument being requested.
org.apache.excalibur.instrument.manager.NoSuchInstrumentException
- If the specified Instrument does
not exist.public org.apache.excalibur.instrument.manager.InstrumentSampleDescriptor locateInstrumentSampleDescriptor(java.lang.String sampleName) throws org.apache.excalibur.instrument.manager.NoSuchInstrumentSampleException
locateInstrumentSampleDescriptor
in interface org.apache.excalibur.instrument.manager.DefaultInstrumentManager
sampleName
- Name of the Instrument Sample being requested.
org.apache.excalibur.instrument.manager.NoSuchInstrumentSampleException
- If the specified Instrument
Sample does not exist.public int getStateVersion()
Clients can use this value to tell whether or not anything has changed without having to do an exhaustive comparison.
getStateVersion
in interface org.apache.excalibur.instrument.manager.DefaultInstrumentManager
public void invokeGarbageCollection()
invokeGarbageCollection
in interface org.apache.excalibur.instrument.manager.DefaultInstrumentManager
public int getLeaseSampleCount()
getLeaseSampleCount
in interface org.apache.excalibur.instrument.manager.DefaultInstrumentManager
public int getMaxLeasedSamples()
getMaxLeasedSamples
in interface org.apache.excalibur.instrument.manager.DefaultInstrumentManager
public int getMaxLeasedSampleSize()
getMaxLeasedSampleSize
in interface org.apache.excalibur.instrument.manager.DefaultInstrumentManager
public long getMaxLeasedSampleLease()
getMaxLeasedSampleLease
in interface org.apache.excalibur.instrument.manager.DefaultInstrumentManager
public void setInstrumentableName(java.lang.String name)
This value may be set by a parent Instrumentable, or by the InstrumentManager using the value of the 'instrumentable' attribute in the configuration of the component.
setInstrumentableName
in interface org.apache.excalibur.instrument.Instrumentable
name
- The name used to identify a Instrumentable.public java.lang.String getInstrumentableName()
getInstrumentableName
in interface org.apache.excalibur.instrument.Instrumentable
public org.apache.excalibur.instrument.Instrument[] getInstruments()
getInstruments
in interface org.apache.excalibur.instrument.Instrumentable
public org.apache.excalibur.instrument.Instrumentable[] getChildInstrumentables()
getChildInstrumentables
in interface org.apache.excalibur.instrument.Instrumentable
public void run()
run
in interface java.lang.Runnable
public void loadStateFromFile(java.io.File stateFile) throws java.lang.Exception
stateFile
- File to read the instrument manager's state from.
java.lang.Exception
- if there are any problems loading the state.public void loadStateFromStream(java.io.InputStream is) throws java.lang.Exception
is
- Stream to read the instrument manager's state from.
java.lang.Exception
- if there are any problems loading the state.public void loadStateFromConfiguration(org.apache.avalon.framework.configuration.Configuration state) throws org.apache.avalon.framework.configuration.ConfigurationException
state
- Configuration object to load the state from.
org.apache.avalon.framework.configuration.ConfigurationException
- If there were any problems loading the
state.public void saveStateToFile(java.io.File stateFile) throws java.lang.Exception
stateFile
- File to write the Instrument Manager's state to.
java.lang.Exception
- if there are any problems saving the state.public void saveStateToStream(java.io.OutputStream os) throws java.lang.Exception
os
- Stream to write the Instrument Manager's state to.
java.lang.Exception
- if there are any problems saving the state.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |