Package org.infinispan.factories
Class GlobalComponentRegistry
- java.lang.Object
-
- org.infinispan.factories.AbstractComponentRegistry
-
- org.infinispan.factories.GlobalComponentRegistry
-
- All Implemented Interfaces:
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 Modifier and Type Class Description class
GlobalComponentRegistry.ModuleInitializer
Module initialization happens inModuleLifecycle.cacheManagerStarting(GlobalComponentRegistry, GlobalConfiguration)
.
-
Field Summary
Fields Modifier and Type Field Description protected ClassLoader
classLoader
-
Fields inherited from class org.infinispan.factories.AbstractComponentRegistry
state
-
-
Constructor Summary
Constructors Constructor Description GlobalComponentRegistry(GlobalConfiguration configuration, EmbeddedCacheManager cacheManager, Set<String> createdCaches, ModuleRepository moduleRepository, ConfigurationManager configurationManager)
Creates an instance of the component registry.
-
Method Summary
-
Methods inherited from class org.infinispan.factories.AbstractComponentRegistry
getComponent, getComponent, getComponent, getComponent, getComponent, getOptionalComponent, getOrCreateComponent, getOrCreateComponent, getOrCreateComponent, getStatus, registerComponent, registerComponent, registerComponent, registerComponentInternal, registerDefaultClassLoader, registerNonVolatileComponent, start, stop, wireDependencies, wireDependencies
-
-
-
-
Field Detail
-
classLoader
protected final ClassLoader classLoader
-
-
Constructor Detail
-
GlobalComponentRegistry
public GlobalComponentRegistry(GlobalConfiguration configuration, EmbeddedCacheManager cacheManager, Set<String> createdCaches, ModuleRepository moduleRepository, ConfigurationManager configurationManager)
Creates an instance of the component registry. The configuration passed in is automatically registered.- Parameters:
configuration
- configuration with which this is createdconfigurationManager
-
-
-
Method Detail
-
getClassLoader
protected ClassLoader getClassLoader()
- Specified by:
getClassLoader
in classAbstractComponentRegistry
-
getLog
protected Log getLog()
- Specified by:
getLog
in classAbstractComponentRegistry
-
removeShutdownHook
protected void removeShutdownHook()
- Overrides:
removeShutdownHook
in classAbstractComponentRegistry
-
getTimeService
public org.infinispan.commons.time.TimeService getTimeService()
- Specified by:
getTimeService
in classAbstractComponentRegistry
-
addShutdownHook
protected void addShutdownHook()
- Overrides:
addShutdownHook
in classAbstractComponentRegistry
-
getNamedComponentRegistries
public final Collection<ComponentRegistry> getNamedComponentRegistries()
-
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()
-
rewire
public void rewire()
Description copied from class:AbstractComponentRegistry
Rewires components. Used to rewire components in the CR if a cache has been stopped (moved to state TERMINATED), which would (almost) empty the registry of components. Rewiring will re-inject all dependencies so that the cache can be started again.- Overrides:
rewire
in classAbstractComponentRegistry
-
preStart
protected void preStart()
- Specified by:
preStart
in classAbstractComponentRegistry
-
postStart
protected void postStart()
- Specified by:
postStart
in classAbstractComponentRegistry
-
preStop
protected void preStop()
- Specified by:
preStop
in classAbstractComponentRegistry
-
postStop
protected void postStop()
- Specified by:
postStop
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
@Deprecated public ModuleProperties getModuleProperties()
Deprecated.
-
getCacheManager
public EmbeddedCacheManager getCacheManager()
-
getClusterTopologyManager
public ClusterTopologyManager getClusterTopologyManager()
-
getLocalTopologyManager
public LocalTopologyManager getLocalTopologyManager()
-
-