public class DefaultManagementRegistryService extends org.terracotta.management.registry.DefaultManagementRegistry implements ManagementRegistryService, CacheManagerListener
Constructor and Description |
---|
DefaultManagementRegistryService() |
DefaultManagementRegistryService(ManagementRegistryServiceConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
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.model.context.ContextContainer |
getContextContainer() |
void |
start(ServiceProvider<Service> 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.
|
addManagementProvider, close, getCapabilities, getCapabilityNames, getManagementProvidersByCapability, register, removeManagementProvider, unregister, withCapability
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public DefaultManagementRegistryService()
public DefaultManagementRegistryService(ManagementRegistryServiceConfiguration configuration)
public void start(ServiceProvider<Service> serviceProvider)
Service
ServiceProvider
.
The service provider allows a service to retrieve and use other services.
A Service
retrieved at this stage may not yet be started. The recommended usage pattern therefore, is to keep a
reference to the dependent Service
but use it only when specific methods are invoked on subtypes.
public void stop()
Service
public void cacheAdded(java.lang.String alias, Cache<?,?> cache)
CacheManagerListener
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.cacheAdded
in interface CacheManagerListener
alias
- the alias the Cache
is being registered oncache
- the actual Cache
addedpublic void cacheRemoved(java.lang.String alias, Cache<?,?> cache)
CacheManagerListener
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 itcacheRemoved
in interface CacheManagerListener
alias
- the alias the Cache
is being deregisteredcache
- the actual Cache
being removedpublic void stateTransition(Status from, Status to)
StateChangeListener
stateTransition
in interface StateChangeListener
from
- previous stateto
- new statepublic ManagementRegistryServiceConfiguration getConfiguration()
getConfiguration
in interface ManagementRegistryService
public org.terracotta.management.model.context.ContextContainer getContextContainer()
getContextContainer
in interface org.terracotta.management.registry.ManagementRegistry
getContextContainer
in class org.terracotta.management.registry.DefaultManagementRegistry