org.apache.excalibur.instrument.manager
Interface DefaultInstrumentManager

All Superinterfaces:
InstrumentManager
All Known Implementing Classes:
DefaultInstrumentManagerImpl

public interface DefaultInstrumentManager
extends InstrumentManager

The public interface to the DefaultInstrumentManager implementation.

Author:
Avalon Development Team

Field Summary
static int INSTRUMENT_SAMPLE_TYPE_COUNTER
          Type which identifies CounterInstrumentSamples.
static int INSTRUMENT_SAMPLE_TYPE_MAXIMUM
          Type which identifies MaximumInstrumentSamples.
static int INSTRUMENT_SAMPLE_TYPE_MEAN
          Type which identifies MeanInstrumentSamples.
static int INSTRUMENT_SAMPLE_TYPE_MINIMUM
          Type which identifies MinimumInstrumentSamples.
static int INSTRUMENT_TYPE_COUNTER
          Type which identifies CounterInstruments.
static int INSTRUMENT_TYPE_NONE
          Type which specifies that the type of a Instrument has not yet been determined.
static int INSTRUMENT_TYPE_VALUE
          Type which identifies ValueInstruments.
 
Fields inherited from interface org.apache.excalibur.instrument.InstrumentManager
ROLE
 
Method Summary
 java.lang.String getDescription()
          Returns the description of this DefaultInstrumentManager.
 InstrumentableDescriptor getInstrumentableDescriptor(java.lang.String instrumentableName)
          Returns a InstrumentableDescriptor based on its name or the name of any of its children.
 InstrumentableDescriptor[] getInstrumentableDescriptors()
          Returns an array of Descriptors for the Instrumentables managed by this DefaultInstrumentManager.
 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 invokeGarbageCollection()
          Invokes garbage collection.
 InstrumentableDescriptor locateInstrumentableDescriptor(java.lang.String instrumentableName)
          Searches the entire instrument tree for an instrumentable with the given name.
 InstrumentDescriptor locateInstrumentDescriptor(java.lang.String instrumentName)
          Searches the entire instrument tree for an instrument with the given name.
 InstrumentSampleDescriptor locateInstrumentSampleDescriptor(java.lang.String sampleName)
          Searches the entire instrument tree for an instrument sample with the given name.
 
Methods inherited from interface org.apache.excalibur.instrument.InstrumentManager
registerInstrumentable
 

Field Detail

INSTRUMENT_TYPE_NONE

public static final int INSTRUMENT_TYPE_NONE
Type which specifies that the type of a Instrument has not yet been determined.

See Also:
Constant Field Values

INSTRUMENT_TYPE_COUNTER

public static final int INSTRUMENT_TYPE_COUNTER
Type which identifies CounterInstruments.

See Also:
Constant Field Values

INSTRUMENT_TYPE_VALUE

public static final int INSTRUMENT_TYPE_VALUE
Type which identifies ValueInstruments.

See Also:
Constant Field Values

INSTRUMENT_SAMPLE_TYPE_COUNTER

public static final int INSTRUMENT_SAMPLE_TYPE_COUNTER
Type which identifies CounterInstrumentSamples.

See Also:
Constant Field Values

INSTRUMENT_SAMPLE_TYPE_MINIMUM

public static final int INSTRUMENT_SAMPLE_TYPE_MINIMUM
Type which identifies MinimumInstrumentSamples.

See Also:
Constant Field Values

INSTRUMENT_SAMPLE_TYPE_MAXIMUM

public static final int INSTRUMENT_SAMPLE_TYPE_MAXIMUM
Type which identifies MaximumInstrumentSamples.

See Also:
Constant Field Values

INSTRUMENT_SAMPLE_TYPE_MEAN

public static final int INSTRUMENT_SAMPLE_TYPE_MEAN
Type which identifies MeanInstrumentSamples.

See Also:
Constant Field Values
Method Detail

getName

public java.lang.String getName()
Returns the name used to identify this DefaultInstrumentManager.

Returns:
The name used to identify this DefaultInstrumentManager.

getDescription

public java.lang.String getDescription()
Returns the description of this DefaultInstrumentManager.

Returns:
The description of this DefaultInstrumentManager.

getInstrumentableDescriptor

public InstrumentableDescriptor getInstrumentableDescriptor(java.lang.String instrumentableName)
                                                     throws NoSuchInstrumentableException
Returns a InstrumentableDescriptor based on its name or the name of any of its children.

Parameters:
instrumentableName - Name of the Instrumentable being requested.
Returns:
A Descriptor of the requested Instrumentable.
Throws:
NoSuchInstrumentableException - If the specified Instrumentable does not exist.

getInstrumentableDescriptors

public InstrumentableDescriptor[] getInstrumentableDescriptors()
Returns an array of Descriptors for the Instrumentables managed by this DefaultInstrumentManager.

Returns:
An array of InstrumentableDescriptors.

locateInstrumentableDescriptor

public InstrumentableDescriptor locateInstrumentableDescriptor(java.lang.String instrumentableName)
                                                        throws NoSuchInstrumentableException
Searches the entire instrument tree for an instrumentable with the given name.

Parameters:
instrumentableName - Name of the Instrumentable being requested.
Returns:
A Descriptor of the requested Instrumentable.
Throws:
NoSuchInstrumentableException - If the specified Instrumentable does not exist.

locateInstrumentDescriptor

public InstrumentDescriptor locateInstrumentDescriptor(java.lang.String instrumentName)
                                                throws NoSuchInstrumentException
Searches the entire instrument tree for an instrument with the given name.

Parameters:
instrumentName - Name of the Instrument being requested.
Returns:
A Descriptor of the requested Instrument.
Throws:
NoSuchInstrumentException - If the specified Instrument does not exist.

locateInstrumentSampleDescriptor

public InstrumentSampleDescriptor locateInstrumentSampleDescriptor(java.lang.String sampleName)
                                                            throws NoSuchInstrumentSampleException
Searches the entire instrument tree for an instrument sample with the given name.

Parameters:
sampleName - Name of the Instrument Sample being requested.
Returns:
A Descriptor of the requested Instrument Sample.
Throws:
NoSuchInstrumentSampleException - If the specified Instrument Sample does not exist.

getStateVersion

public int getStateVersion()
Returns the stateVersion of the DefaultInstrumeManager. The state version will be incremented each time any of the configuration of the instrument manager or any of its children is modified.

Clients can use this value to tell whether or not anything has changed without having to do an exhaustive comparison.

Returns:
The state version of the instrument manager.

invokeGarbageCollection

public void invokeGarbageCollection()
Invokes garbage collection.


getLeaseSampleCount

public int getLeaseSampleCount()
Returns the current number of leased samples.

Returns:
The current number of leased samples.

getMaxLeasedSamples

public int getMaxLeasedSamples()
Returns the maximum number of leased samples that will be approved.

Returns:
The maximum number of leased samples.

getMaxLeasedSampleSize

public int getMaxLeasedSampleSize()
Returns the maximum size of a leased sample.

Returns:
The maximum size of a leased sample.

getMaxLeasedSampleLease

public long getMaxLeasedSampleLease()
Returns the maximum number of milliseconds that a lease will be granted for.

Returns:
The maximum lease length.


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.