org.ehcache.management.registry
Class DefaultSharedManagementService

java.lang.Object
  extended by org.ehcache.management.registry.DefaultSharedManagementService
All Implemented Interfaces:
CapabilityManagementSupport, SharedManagementService, Service

public class DefaultSharedManagementService
extends java.lang.Object
implements SharedManagementService

This service can be registered across several cache managers and provides a way to access per-cache manager management registry


Constructor Summary
DefaultSharedManagementService()
           
 
Method Summary
 java.util.Map<java.lang.String,java.util.Collection<org.terracotta.management.capabilities.Capability>> getCapabilities()
          Get the management capabilities of all the registered objects across several cache managers.
 java.util.Collection<org.terracotta.management.context.ContextContainer> getContexts()
          Get the management contexts required to make use of the registered objects' capabilities.
 java.util.Collection<ManagementProvider<?>> getManagementProvidersByCapability(java.lang.String capabilityName)
          List all management providers installed for a specific capability across all cache managers
 void start(ServiceProvider serviceProvider)
          Start this service using the provided configuration and ServiceProvider.
 void stop()
          Stops this service.
 CapabilityManagement withCapability(java.lang.String capabilityName)
          Query based on a capability of this management registry, such as collecting statistics or calling some actions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSharedManagementService

public DefaultSharedManagementService()
Method Detail

start

public void start(ServiceProvider serviceProvider)
Description copied from interface: Service
Start this service using the provided configuration and ServiceProvider.

The goal of the service provider is to allow a service to use other services.

Specified by:
start in interface Service
Parameters:
serviceProvider - the service provider.

stop

public void stop()
Description copied from interface: Service
Stops this service.

Specified by:
stop in interface Service

getContexts

public java.util.Collection<org.terracotta.management.context.ContextContainer> getContexts()
Description copied from interface: SharedManagementService
Get the management contexts required to make use of the registered objects' capabilities.

Specified by:
getContexts in interface SharedManagementService
Returns:
a collection of contexts.

getCapabilities

public java.util.Map<java.lang.String,java.util.Collection<org.terracotta.management.capabilities.Capability>> getCapabilities()
Description copied from interface: SharedManagementService
Get the management capabilities of all the registered objects across several cache managers.

Specified by:
getCapabilities in interface SharedManagementService
Returns:
a map of capabilities, where the key is the alias of the cache manager

getManagementProvidersByCapability

public java.util.Collection<ManagementProvider<?>> getManagementProvidersByCapability(java.lang.String capabilityName)
Description copied from interface: CapabilityManagementSupport
List all management providers installed for a specific capability across all cache managers

Specified by:
getManagementProvidersByCapability in interface CapabilityManagementSupport
Parameters:
capabilityName - The capability name
Returns:
The list of management providers installed

withCapability

public CapabilityManagement withCapability(java.lang.String capabilityName)
Description copied from interface: CapabilityManagementSupport
Query based on a capability of this management registry, such as collecting statistics or calling some actions

Specified by:
withCapability in interface CapabilityManagementSupport
Parameters:
capabilityName - The capability to work with
Returns:
An intermediary class enabling the access of methods based on a capability