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
Method Summary |
String |
getCacheName()
|
|
getComponent(Class<T> componentType,
String name)
|
protected Map<Class,Class<? extends AbstractComponentFactory>> |
getDefaultFactoryMap()
|
GlobalComponentRegistry |
getGlobalComponentRegistry()
|
|
getLocalComponent(Class<T> componentType)
|
|
getLocalComponent(Class<T> componentType,
String name)
|
protected Log |
getLog()
|
protected AbstractComponentRegistry.Component |
lookupComponent(Class componentClass,
String name)
|
protected AbstractComponentRegistry.Component |
lookupLocalComponent(Class componentClass,
String name)
|
protected void |
registerComponentInternal(Object component,
String name,
boolean nonVolatile)
|
void |
setCacheManagerNotifier(CacheManagerNotifier cacheManagerNotifier)
|
void |
start()
This starts the components in the cache, connecting to channels, starting service threads, etc. |
void |
stop()
Stops the cache and sets the cache status to ComponentStatus.TERMINATED once it
is done. |
Methods inherited from class org.infinispan.factories.AbstractComponentRegistry |
addComponentDependencies, addShutdownHook, clone, getComponent, getConfiguration, getFactory, getOrCreateComponent, getOrCreateComponent, getRegisteredComponents, getStatus, invocationsAllowed, invokeInjectionMethod, registerComponent, registerComponent, registerDefaultClassLoader, registerNonVolatileComponent, registerNonVolatileComponent, registerNullComponent, removeShutdownHook, resetVolatileComponents, rewire, wireDependencies |
ComponentRegistry
public ComponentRegistry(String cacheName,
Configuration configuration,
AdvancedCache cache,
GlobalComponentRegistry globalComponents,
ReflectionCache reflectionCache)
- 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()
registerComponentInternal
protected void registerComponentInternal(Object component,
String name,
boolean nonVolatile)
- Overrides:
registerComponentInternal
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
getCacheName
public String getCacheName()
Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.