org.infinispan.factories
Class ComponentRegistry
java.lang.Object
org.infinispan.factories.AbstractComponentRegistry
org.infinispan.factories.ComponentRegistry
- All Implemented Interfaces:
- Cloneable, Lifecycle
public class ComponentRegistry
- extends AbstractComponentRegistry
Named cache specific components
- Since:
- 4.0
- Author:
- Manik Surtani
Methods inherited from class org.infinispan.factories.AbstractComponentRegistry |
addComponentDependencies, addShutdownHook, clone, getComponent, getConfiguration, getFactory, getFromConfiguration, getOrCreateComponent, getOrCreateComponent, getRegisteredComponents, getStatus, invocationsAllowed, invokeInjectionMethod, registerComponent, registerDefaultClassLoader, removeShutdownHook, resetNonVolatile, rewire, wireDependencies |
ComponentRegistry
public ComponentRegistry(String cacheName,
Configuration configuration,
AdvancedCache cache,
GlobalComponentRegistry globalComponents)
- Creates an instance of the component registry. The configuration passed in is automatically registered.
- Parameters:
configuration
- configuration with which this is createdcache
- cacheglobalComponents
- Shared Component Registry to delegate to
setCacheManagerNotifier
public void setCacheManagerNotifier(CacheManagerNotifier cacheManagerNotifier)
getLog
protected Log getLog()
- Specified by:
getLog
in class AbstractComponentRegistry
getComponent
public final <T> T getComponent(Class<T> componentType,
String name)
- Overrides:
getComponent
in class AbstractComponentRegistry
getLocalComponent
public final <T> T getLocalComponent(Class<T> componentType,
String name)
getLocalComponent
public final <T> T getLocalComponent(Class<T> componentType)
getDefaultFactoryMap
protected final Map<Class,Class<? extends AbstractComponentFactory>> getDefaultFactoryMap()
- Overrides:
getDefaultFactoryMap
in class AbstractComponentRegistry
lookupComponent
protected final AbstractComponentRegistry.Component lookupComponent(Class componentClass,
String name)
- Overrides:
lookupComponent
in class AbstractComponentRegistry
lookupLocalComponent
protected final AbstractComponentRegistry.Component lookupLocalComponent(Class componentClass,
String name)
getGlobalComponentRegistry
public final GlobalComponentRegistry getGlobalComponentRegistry()
registerComponent
public final void registerComponent(Object component,
String name)
- Overrides:
registerComponent
in class AbstractComponentRegistry
start
public void start()
- Description copied from class:
AbstractComponentRegistry
- This starts the components in the cache, connecting to channels, starting service threads, etc. If the cache is
not in the
ComponentStatus.INITIALIZING
state, it will be initialized first.
- Specified by:
start
in interface Lifecycle
- Overrides:
start
in class AbstractComponentRegistry
stop
public void stop()
- Description copied from class:
AbstractComponentRegistry
- Stops the cache and sets the cache status to
ComponentStatus.TERMINATED
once it
is done. If the cache is not in the ComponentStatus.RUNNING
state, this is a
no-op.
- Specified by:
stop
in interface Lifecycle
- Overrides:
stop
in class AbstractComponentRegistry
Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.