org.opends.server.monitors
Class EntryCacheMonitorProvider

java.lang.Object
  extended by java.lang.Thread
      extended by org.opends.server.api.DirectoryThread
          extended by org.opends.server.api.MonitorProvider<EntryCacheMonitorProviderCfg>
              extended by org.opends.server.monitors.EntryCacheMonitorProvider
All Implemented Interfaces:
java.lang.Runnable

public class EntryCacheMonitorProvider
extends MonitorProvider<EntryCacheMonitorProviderCfg>

This class defines a Directory Server monitor provider that can be used to obtain information about the entry cache state. Note that the information reported is obtained with no locking, so it may not be entirely consistent.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
EntryCacheMonitorProvider()
          Creates default instance of this monitor provider.
EntryCacheMonitorProvider(java.lang.String entryCacheName, EntryCache<? extends EntryCacheCfg> entryCache)
          Creates implementation specific instance of this monitor provider.
 
Method Summary
 java.util.ArrayList<Attribute> getMonitorData()
          Retrieves a set of attributes containing monitor data that should be returned to the client if the corresponding monitor entry is requested.
 java.lang.String getMonitorInstanceName()
          Retrieves the name of this monitor provider.
 long getUpdateInterval()
          Retrieves the length of time in milliseconds that should elapse between calls to the updateMonitorData method.
 void initializeMonitorProvider(EntryCacheMonitorProviderCfg configuration)
          Initializes this monitor provider based on the information in the provided configuration entry.
 void updateMonitorData()
          Performs any processing periodic processing that may be desired to update the information associated with this monitor.
 
Methods inherited from class org.opends.server.api.MonitorProvider
finalizeMonitorProvider, getMonitorObjectClass, isConfigurationAcceptable, run
 
Methods inherited from class org.opends.server.api.DirectoryThread
getAssociatedTask, getCreationStackTrace, getDebugProperties, getParentThread, setAssociatedTask
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntryCacheMonitorProvider

public EntryCacheMonitorProvider()
Creates default instance of this monitor provider.


EntryCacheMonitorProvider

public EntryCacheMonitorProvider(java.lang.String entryCacheName,
                                 EntryCache<? extends EntryCacheCfg> entryCache)
Creates implementation specific instance of this monitor provider.

Parameters:
entryCacheName - The name to use for this monitor provider.
entryCache - The entry cache to associate this monitor provider with.
Method Detail

initializeMonitorProvider

public void initializeMonitorProvider(EntryCacheMonitorProviderCfg configuration)
                               throws ConfigException
Initializes this monitor provider based on the information in the provided configuration entry.

Specified by:
initializeMonitorProvider in class MonitorProvider<EntryCacheMonitorProviderCfg>
Parameters:
configuration - The configuration to use to initialize this monitor provider.
Throws:
ConfigException - If an unrecoverable problem arises in the process of performing the initialization.

getMonitorInstanceName

public java.lang.String getMonitorInstanceName()
Retrieves the name of this monitor provider. It should be unique among all monitor providers, including all instances of the same monitor provider.

Specified by:
getMonitorInstanceName in class MonitorProvider<EntryCacheMonitorProviderCfg>
Returns:
The name of this monitor provider.

getUpdateInterval

public long getUpdateInterval()
Retrieves the length of time in milliseconds that should elapse between calls to the updateMonitorData method. A negative or zero return value indicates that the updateMonitorData method should not be periodically invoked.

Specified by:
getUpdateInterval in class MonitorProvider<EntryCacheMonitorProviderCfg>
Returns:
The length of time in milliseconds that should elapse between calls to the updateMonitorData() method.

updateMonitorData

public void updateMonitorData()
Performs any processing periodic processing that may be desired to update the information associated with this monitor. Note that best-effort attempts will be made to ensure that calls to this method come getUpdateInterval milliseconds apart, but no guarantees will be made.

Specified by:
updateMonitorData in class MonitorProvider<EntryCacheMonitorProviderCfg>

getMonitorData

public java.util.ArrayList<Attribute> getMonitorData()
Retrieves a set of attributes containing monitor data that should be returned to the client if the corresponding monitor entry is requested.

Specified by:
getMonitorData in class MonitorProvider<EntryCacheMonitorProviderCfg>
Returns:
A set of attributes containing monitor data that should be returned to the client if the corresponding monitor entry is requested.