Package org.infinispan.factories
Class GlobalComponentRegistry
- java.lang.Object
-
- org.infinispan.factories.AbstractComponentRegistry
-
- org.infinispan.factories.GlobalComponentRegistry
-
- All Implemented Interfaces:
Cloneable
,org.infinispan.commons.api.Lifecycle
@ThreadSafe public class GlobalComponentRegistry extends AbstractComponentRegistry
A global component registry where shared components are stored.- Since:
- 4.0
- Author:
- Manik Surtani
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.infinispan.factories.AbstractComponentRegistry
AbstractComponentRegistry.Component
-
-
Field Summary
Fields Modifier and Type Field Description protected WeakReference<ClassLoader>
defaultClassLoader
-
Fields inherited from class org.infinispan.factories.AbstractComponentRegistry
DEBUG_DEPENDENCIES, state
-
-
Constructor Summary
Constructors Constructor Description GlobalComponentRegistry(GlobalConfiguration configuration, EmbeddedCacheManager cacheManager, Set<String> createdCaches)
Creates an instance of the component registry.
-
Method Summary
-
Methods inherited from class org.infinispan.factories.AbstractComponentRegistry
clone, createComponentFactoryInternal, getComponent, getComponent, getComponent, getComponent, getComponent, getConfiguration, getFactory, getOptionalComponent, getOrCreateComponent, getOrCreateComponent, getOrCreateComponent, getRegisteredComponents, getStatus, invocationsAllowed, lookupComponent, postStart, registerComponent, registerComponent, registerComponent, registerComponentInternal, registerDefaultClassLoader, registerNonVolatileComponent, registerNonVolatileComponent, registerNullComponent, resetVolatileComponents, rewire, throwStackAwareConfigurationException, wireDependencies
-
-
-
-
Field Detail
-
defaultClassLoader
protected final WeakReference<ClassLoader> defaultClassLoader
-
-
Constructor Detail
-
GlobalComponentRegistry
public GlobalComponentRegistry(GlobalConfiguration configuration, EmbeddedCacheManager cacheManager, Set<String> createdCaches)
Creates an instance of the component registry. The configuration passed in is automatically registered.- Parameters:
configuration
- configuration with which this is created
-
-
Method Detail
-
getClassLoader
protected ClassLoader getClassLoader()
- Specified by:
getClassLoader
in classAbstractComponentRegistry
-
getLog
protected Log getLog()
- Specified by:
getLog
in classAbstractComponentRegistry
-
getComponentMetadataRepo
public ComponentMetadataRepo getComponentMetadataRepo()
- Specified by:
getComponentMetadataRepo
in classAbstractComponentRegistry
-
removeShutdownHook
protected void removeShutdownHook()
- Overrides:
removeShutdownHook
in classAbstractComponentRegistry
-
getTimeService
public TimeService getTimeService()
- Specified by:
getTimeService
in classAbstractComponentRegistry
-
addShutdownHook
protected void addShutdownHook()
- Overrides:
addShutdownHook
in classAbstractComponentRegistry
-
getNamedComponentRegistry
public final ComponentRegistry getNamedComponentRegistry(String name)
-
getNamedComponentRegistry
public final ComponentRegistry getNamedComponentRegistry(ByteString name)
-
registerNamedComponentRegistry
public final void registerNamedComponentRegistry(ComponentRegistry componentRegistry, String name)
-
unregisterNamedComponentRegistry
public final void unregisterNamedComponentRegistry(String name)
-
rewireNamedRegistries
public final void rewireNamedRegistries()
-
getModuleCommandInitializers
public Map<Byte,ModuleCommandInitializer> getModuleCommandInitializers()
-
start
public void start()
Description copied from class:AbstractComponentRegistry
This starts the components in the registry, connecting to channels, starting service threads, etc. If the component is not in theComponentStatus.INITIALIZING
state, it will be initialized first.- Specified by:
start
in interfaceorg.infinispan.commons.api.Lifecycle
- Overrides:
start
in classAbstractComponentRegistry
-
stop
public void stop()
Description copied from class:AbstractComponentRegistry
Stops the component and sets its status toComponentStatus.TERMINATED
once it is done. If the component is not in theComponentStatus.RUNNING
state, this is a no-op.- Specified by:
stop
in interfaceorg.infinispan.commons.api.Lifecycle
- Overrides:
stop
in classAbstractComponentRegistry
-
notifyCacheStarted
public void notifyCacheStarted(String cacheName)
-
getGlobalConfiguration
public final GlobalConfiguration getGlobalConfiguration()
-
removeCache
public boolean removeCache(String cacheName)
Removes a cache with the given name, returning true if the cache was removed.
-
getModuleProperties
public ModuleProperties getModuleProperties()
-
-