org.ehcache.management.providers.statistics
Class EhcacheStatisticsProvider

java.lang.Object
  extended by org.ehcache.management.providers.statistics.EhcacheStatisticsProvider
All Implemented Interfaces:
ManagementProvider<Ehcache>

public class EhcacheStatisticsProvider
extends java.lang.Object
implements ManagementProvider<Ehcache>


Constructor Summary
EhcacheStatisticsProvider(StatisticsProviderConfiguration statisticsProviderConfiguration, java.util.concurrent.ScheduledExecutorService executor)
           
 
Method Summary
 java.lang.Object callAction(java.util.Map<java.lang.String,java.lang.String> context, java.lang.String methodName, java.lang.String[] argClassNames, java.lang.Object[] args)
          Call an action, if the provider supports this.
 org.terracotta.management.capabilities.context.CapabilityContext capabilityContext()
          Get the context that the provided capabilities need to run.
 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.
 java.util.Set<org.terracotta.management.capabilities.descriptors.Descriptor> descriptions()
          Get the set of capability descriptors the current provider provides.
 StatisticsProviderConfiguration getConfiguration()
           
 java.lang.Class<Ehcache> managedType()
          The class of managed objects.
 void register(Ehcache ehcache)
          Register an object for management in the current provider.
 void unregister(Ehcache ehcache)
          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
 

Constructor Detail

EhcacheStatisticsProvider

public EhcacheStatisticsProvider(StatisticsProviderConfiguration statisticsProviderConfiguration,
                                 java.util.concurrent.ScheduledExecutorService executor)
Method Detail

getConfiguration

public StatisticsProviderConfiguration getConfiguration()

register

public void register(Ehcache ehcache)
Description copied from interface: ManagementProvider
Register an object for management in the current provider.

Specified by:
register in interface ManagementProvider<Ehcache>
Parameters:
ehcache - the object to manage.

unregister

public void unregister(Ehcache ehcache)
Description copied from interface: ManagementProvider
Unregister a managed object from the current provider.

Specified by:
unregister in interface ManagementProvider<Ehcache>
Parameters:
ehcache - the managed object.

managedType

public java.lang.Class<Ehcache> managedType()
Description copied from interface: ManagementProvider
The class of managed objects.

Specified by:
managedType in interface ManagementProvider<Ehcache>
Returns:
a class.

descriptions

public 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<Ehcache>
Returns:
the set of capability descriptors.

capabilityContext

public org.terracotta.management.capabilities.context.CapabilityContext capabilityContext()
Description copied from interface: ManagementProvider
Get the context that the provided capabilities need to run.

Specified by:
capabilityContext in interface ManagementProvider<Ehcache>
Returns:
the context requirements.

collectStatistics

public 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<Ehcache>
Parameters:
context - the context.
statisticNames - the statistic names to collect.
Returns:
the statistic values.

callAction

public java.lang.Object callAction(java.util.Map<java.lang.String,java.lang.String> context,
                                   java.lang.String methodName,
                                   java.lang.String[] argClassNames,
                                   java.lang.Object[] args)
Description copied from interface: ManagementProvider
Call an action, if the provider supports this.

Specified by:
callAction in interface ManagementProvider<Ehcache>
Parameters:
context - the context.
methodName - the method name.
argClassNames - the class names of the method arguments.
args - the method arguments.
Returns:
the action's return value.