org.ehcache.management.registry
Class DefaultSharedManagementService

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

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<org.terracotta.management.context.Context,java.util.Collection<org.terracotta.management.capabilities.Capability>> getCapabilities()
          Get the management capabilities of all the registered objects across several cache managers.
 java.util.Map<org.terracotta.management.context.Context,org.terracotta.management.context.ContextContainer> getContextContainers()
          Get the management contexts required to make use of the registered objects' capabilities.
 java.util.Collection<org.terracotta.management.registry.ManagementProvider<?>> getManagementProvidersByCapability(java.lang.String capabilityName)
           
 void start(ServiceProvider serviceProvider)
          Start this service using the provided configuration and ServiceProvider.
 void stop()
          Stops this service.
 org.terracotta.management.registry.CapabilityManagement withCapability(java.lang.String capabilityName)
           
 
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

getContextContainers

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

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

getCapabilities

public java.util.Map<org.terracotta.management.context.Context,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<org.terracotta.management.registry.ManagementProvider<?>> getManagementProvidersByCapability(java.lang.String capabilityName)
Specified by:
getManagementProvidersByCapability in interface org.terracotta.management.registry.CapabilityManagementSupport

withCapability

public org.terracotta.management.registry.CapabilityManagement withCapability(java.lang.String capabilityName)
Specified by:
withCapability in interface org.terracotta.management.registry.CapabilityManagementSupport