org.ehcache.management.providers
Class AbstractActionProvider<T,A>
java.lang.Object
org.ehcache.management.providers.AbstractActionProvider<T,A>
- All Implemented Interfaces:
- ManagementProvider<T>
- Direct Known Subclasses:
- CapabilityContextProvider, EhcacheActionProvider
public abstract class AbstractActionProvider<T,A>
- extends java.lang.Object
- implements ManagementProvider<T>
An abstract ManagementProvider with the base logic for handling actions.
Field Summary |
protected java.util.concurrent.ConcurrentMap<T,A> |
actions
|
Method Summary |
java.util.Collection<org.terracotta.management.stats.Statistic<?>> |
collectStatistics(java.util.Map<java.lang.String,java.lang.String> context,
java.lang.String[] statisticNames)
Collect statistics, if the provider supports this. |
protected abstract A |
createActionWrapper(T contextObject)
|
java.util.Set<org.terracotta.management.capabilities.descriptors.Descriptor> |
descriptions()
Get the set of capability descriptors the current provider provides. |
void |
register(T contextObject)
Register an object for management in the current provider. |
void |
unregister(T contextObject)
Unregister a managed object from the current provider. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
actions
protected final java.util.concurrent.ConcurrentMap<T,A> actions
AbstractActionProvider
public AbstractActionProvider()
register
public final void register(T contextObject)
- Description copied from interface:
ManagementProvider
- Register an object for management in the current provider.
- Specified by:
register
in interface ManagementProvider<T>
- Parameters:
contextObject
- the object to manage.
createActionWrapper
protected abstract A createActionWrapper(T contextObject)
unregister
public final void unregister(T contextObject)
- Description copied from interface:
ManagementProvider
- Unregister a managed object from the current provider.
- Specified by:
unregister
in interface ManagementProvider<T>
- Parameters:
contextObject
- the managed object.
descriptions
public final java.util.Set<org.terracotta.management.capabilities.descriptors.Descriptor> descriptions()
- Description copied from interface:
ManagementProvider
- Get the set of capability descriptors the current provider provides.
- Specified by:
descriptions
in interface ManagementProvider<T>
- Returns:
- the set of capability descriptors.
collectStatistics
public final java.util.Collection<org.terracotta.management.stats.Statistic<?>> collectStatistics(java.util.Map<java.lang.String,java.lang.String> context,
java.lang.String[] statisticNames)
- Description copied from interface:
ManagementProvider
- Collect statistics, if the provider supports this.
- Specified by:
collectStatistics
in interface ManagementProvider<T>
- Parameters:
context
- the context.statisticNames
- the statistic names to collect.
- Returns:
- the statistic values.