org.ehcache.management.registry
Class DefaultManagementRegistryService

java.lang.Object
  extended by org.terracotta.management.registry.AbstractManagementRegistry
      extended by org.ehcache.management.registry.DefaultManagementRegistryService
All Implemented Interfaces:
CacheManagerListener, StateChangeListener, ManagementRegistryService, Service, org.terracotta.management.registry.CapabilityManagementSupport, org.terracotta.management.registry.ManagementRegistry

public class DefaultManagementRegistryService
extends org.terracotta.management.registry.AbstractManagementRegistry
implements ManagementRegistryService, CacheManagerListener


Field Summary
 
Fields inherited from class org.terracotta.management.registry.AbstractManagementRegistry
managementProviders
 
Constructor Summary
DefaultManagementRegistryService()
           
DefaultManagementRegistryService(ManagementRegistryServiceConfiguration configuration)
           
 
Method Summary
 void cacheAdded(java.lang.String alias, Cache<?,?> cache)
          Fires just after the @{link Cache} was made Status.AVAILABLE, but wasn't yet made available to other threads by the CacheManager.
 void cacheRemoved(java.lang.String alias, Cache<?,?> cache)
          Fires just after the @{link Cache} was deregistered with the CacheManager, but wasn't yet made Status.UNINITIALIZED.
 ManagementRegistryServiceConfiguration getConfiguration()
           
 org.terracotta.management.context.ContextContainer getContextContainer()
           
 void start(ServiceProvider serviceProvider)
          Start this service using the provided configuration and ServiceProvider.
 void stateTransition(Status from, Status to)
          Is notified when a state transition occurred.
 void stop()
          Stops this service.
 
Methods inherited from class org.terracotta.management.registry.AbstractManagementRegistry
addManagementProvider, getCapabilities, getManagementProvidersByCapability, register, removeManagementProvider, unregister, withCapability
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.terracotta.management.registry.ManagementRegistry
addManagementProvider, getCapabilities, register, removeManagementProvider, unregister
 
Methods inherited from interface org.terracotta.management.registry.CapabilityManagementSupport
getManagementProvidersByCapability, withCapability
 

Constructor Detail

DefaultManagementRegistryService

public DefaultManagementRegistryService()

DefaultManagementRegistryService

public DefaultManagementRegistryService(ManagementRegistryServiceConfiguration configuration)
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

cacheAdded

public void cacheAdded(java.lang.String alias,
                       Cache<?,?> cache)
Description copied from interface: CacheManagerListener
Fires just after the @{link Cache} was made Status.AVAILABLE, but wasn't yet made available to other threads by the CacheManager. Nonetheless, no other thread can add another Cache instance by the same alias.

Specified by:
cacheAdded in interface CacheManagerListener
Parameters:
alias - the alias the Cache is being registered on
cache - the actual Cache added

cacheRemoved

public void cacheRemoved(java.lang.String alias,
                         Cache<?,?> cache)
Description copied from interface: CacheManagerListener
Fires just after the @{link Cache} was deregistered with the CacheManager, but wasn't yet made Status.UNINITIALIZED. So that no other thread can get a handle to this Cache anymore, but the CacheManagerListener can still interact with it

Specified by:
cacheRemoved in interface CacheManagerListener
Parameters:
alias - the alias the Cache is being deregistered
cache - the actual Cache being removed

stateTransition

public void stateTransition(Status from,
                            Status to)
Description copied from interface: StateChangeListener
Is notified when a state transition occurred. Any exception thrown by this listener will not affect the transition.

Specified by:
stateTransition in interface StateChangeListener
Parameters:
from - previous state
to - new state

getConfiguration

public ManagementRegistryServiceConfiguration getConfiguration()
Specified by:
getConfiguration in interface ManagementRegistryService
Returns:
This registry configuration

getContextContainer

public org.terracotta.management.context.ContextContainer getContextContainer()
Specified by:
getContextContainer in interface org.terracotta.management.registry.ManagementRegistry