public class ComponentRegistry extends AbstractComponentRegistry
AbstractComponentRegistry.Component
Modifier and Type | Field and Description |
---|---|
protected WeakReference<ClassLoader> |
defaultClassLoader |
DEBUG_DEPENDENCIES, state
Constructor and Description |
---|
ComponentRegistry(String cacheName,
Configuration configuration,
AdvancedCache<?,?> cache,
GlobalComponentRegistry globalComponents,
ClassLoader defaultClassLoader)
Creates an instance of the component registry.
|
Modifier and Type | Method and Description |
---|---|
void |
cacheComponents()
Invoked last after all services are wired
|
protected AbstractComponentFactory |
createComponentFactoryInternal(Class<?> componentClass,
String cfClass) |
StreamingMarshaller |
getCacheMarshaller()
Caching shortcut for #getComponent(StreamingMarshaller.class, KnownComponentNames.CACHE_MARSHALLER);
|
String |
getCacheName() |
protected ClassLoader |
getClassLoader() |
CommandsFactory |
getCommandsFactory()
Caching shortcut for #getLocalComponent(CommandsFactory.class);
|
<T> T |
getComponent(String componentTypeName,
String name,
boolean nameIsFQCN) |
ComponentMetadataRepo |
getComponentMetadataRepo() |
protected AbstractComponentFactory |
getFactory(Class<?> componentClass)
Retrieves a component factory instance capable of constructing components of a specified type.
|
GlobalComponentRegistry |
getGlobalComponentRegistry() |
<T> T |
getLocalComponent(Class<T> componentType) |
<T> T |
getLocalComponent(String componentTypeName,
String name,
boolean nameIsFQCN) |
protected Log |
getLog() |
protected <T> T |
getOrCreateComponent(Class<T> componentClass,
String name,
boolean nameIsFQCN) |
ResponseGenerator |
getResponseGenerator()
Caching shortcut for #getComponent(ResponseGenerator.class);
|
StateTransferLock |
getStateTransferLock()
Caching shortcut for #getComponent(StateTransferManager.class);
|
StateTransferManager |
getStateTransferManager()
Caching shortcut for #getComponent(StateTransferManager.class);
|
TimeService |
getTimeService() |
TotalOrderManager |
getTotalOrderManager() |
protected AbstractComponentRegistry.Component |
lookupComponent(String componentClassName,
String name,
boolean nameIsFQCN) |
protected AbstractComponentRegistry.Component |
lookupLocalComponent(String componentClassName,
String name,
boolean nameIsFQCN) |
protected void |
registerComponentInternal(Object component,
String name,
boolean nameIsFQCN) |
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. |
addShutdownHook, clone, getComponent, getComponent, getComponent, getComponent, getConfiguration, getOrCreateComponent, getOrCreateComponent, getRegisteredComponents, getStatus, invocationsAllowed, registerComponent, registerComponent, registerComponent, registerDefaultClassLoader, registerNonVolatileComponent, registerNonVolatileComponent, registerNullComponent, removeShutdownHook, resetVolatileComponents, rewire, throwStackAwareConfigurationException, wireDependencies
protected final WeakReference<ClassLoader> defaultClassLoader
public ComponentRegistry(String cacheName, Configuration configuration, AdvancedCache<?,?> cache, GlobalComponentRegistry globalComponents, ClassLoader defaultClassLoader)
configuration
- configuration with which this is createdcache
- cacheglobalComponents
- Shared Component Registry to delegate topublic void setCacheManagerNotifier(CacheManagerNotifier cacheManagerNotifier)
protected ClassLoader getClassLoader()
getClassLoader
in class AbstractComponentRegistry
protected Log getLog()
getLog
in class AbstractComponentRegistry
public final <T> T getComponent(String componentTypeName, String name, boolean nameIsFQCN)
getComponent
in class AbstractComponentRegistry
public final <T> T getLocalComponent(String componentTypeName, String name, boolean nameIsFQCN)
public final <T> T getLocalComponent(Class<T> componentType)
protected final AbstractComponentRegistry.Component lookupComponent(String componentClassName, String name, boolean nameIsFQCN)
lookupComponent
in class AbstractComponentRegistry
protected final AbstractComponentRegistry.Component lookupLocalComponent(String componentClassName, String name, boolean nameIsFQCN)
public final GlobalComponentRegistry getGlobalComponentRegistry()
protected final <T> T getOrCreateComponent(Class<T> componentClass, String name, boolean nameIsFQCN)
getOrCreateComponent
in class AbstractComponentRegistry
protected AbstractComponentFactory getFactory(Class<?> componentClass)
AbstractComponentRegistry
getFactory
in class AbstractComponentRegistry
componentClass
- type of component to constructprotected final void registerComponentInternal(Object component, String name, boolean nameIsFQCN)
registerComponentInternal
in class AbstractComponentRegistry
protected AbstractComponentFactory createComponentFactoryInternal(Class<?> componentClass, String cfClass)
createComponentFactoryInternal
in class AbstractComponentRegistry
public void start()
AbstractComponentRegistry
ComponentStatus.INITIALIZING
state, it will be initialized first.start
in interface Lifecycle
start
in class AbstractComponentRegistry
public void stop()
AbstractComponentRegistry
ComponentStatus.TERMINATED
once it
is done. If the cache is not in the ComponentStatus.RUNNING
state, this is a
no-op.stop
in interface Lifecycle
stop
in class AbstractComponentRegistry
public TimeService getTimeService()
getTimeService
in class AbstractComponentRegistry
public String getCacheName()
public StreamingMarshaller getCacheMarshaller()
public StateTransferManager getStateTransferManager()
public ResponseGenerator getResponseGenerator()
public CommandsFactory getCommandsFactory()
public StateTransferLock getStateTransferLock()
public void cacheComponents()
public ComponentMetadataRepo getComponentMetadataRepo()
getComponentMetadataRepo
in class AbstractComponentRegistry
public final TotalOrderManager getTotalOrderManager()
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.