Package org.infinispan.factories
Class ComponentRegistry
- java.lang.Object
-
- org.infinispan.factories.AbstractComponentRegistry
-
- org.infinispan.factories.ComponentRegistry
-
public class ComponentRegistry extends AbstractComponentRegistry
Named cache specific components- Since:
- 4.0
- Author:
- Manik Surtani
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.infinispan.factories.AbstractComponentRegistry
AbstractComponentRegistry.Component
-
-
Field Summary
-
Fields inherited from class org.infinispan.factories.AbstractComponentRegistry
DEBUG_DEPENDENCIES, state
-
-
Constructor Summary
Constructors Constructor Description ComponentRegistry(String cacheName, Configuration configuration, AdvancedCache<?,?> cache, GlobalComponentRegistry globalComponents, ClassLoader defaultClassLoader)
Creates an instance of the component registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
bootstrapComponents()
Invoked before anyModuleCommandInitializer
.void
cacheComponents()
Invoked last after all services are wiredStreamingMarshaller
getCacheMarshaller()
Caching shortcut for #getComponent(StreamingMarshaller.class, KnownComponentNames.CACHE_MARSHALLER);String
getCacheName()
protected ClassLoader
getClassLoader()
org.infinispan.commands.CommandsFactory
getCommandsFactory()
Caching shortcut for #getLocalComponent(CommandsFactory.class);<T> T
getComponent(String componentTypeName, String name, boolean nameIsFQCN)
ComponentMetadataRepo
getComponentMetadataRepo()
Configuration
getConfiguration()
Retrieves the configuration component.DistributionManager
getDistributionManager()
Caching shortcut for #getComponent(DistributionManager.class);GlobalComponentRegistry
getGlobalComponentRegistry()
<T> T
getLocalComponent(Class<T> componentType)
<T> T
getLocalComponent(String componentTypeName, String name, boolean nameIsFQCN)
protected org.infinispan.util.logging.Log
getLog()
protected <T> T
getOrCreateComponent(Class<T> componentClass, String name, boolean nameIsFQCN)
PerCacheInboundInvocationHandler
getPerCacheInboundInvocationHandler()
Caching shortcut for #getComponent(PerCacheInboundInvocationHandler.class);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()
TransactionTable
getTransactionTable()
VersionGenerator
getVersionGenerator()
Caching shortcut for #getLocalComponent(VersionGenerator.class)protected AbstractComponentRegistry.Component
lookupLocalComponent(String componentClassName, String name, boolean nameIsFQCN)
protected void
postStart()
protected void
postStop()
protected void
preStart()
protected void
preStop()
void
registerVersionGenerator(NumericVersionGenerator newVersionGenerator)
void
start()
This starts the components in the registry, connecting to channels, starting service threads, etc.-
Methods inherited from class org.infinispan.factories.AbstractComponentRegistry
addShutdownHook, clone, createComponentFactoryInternal, getComponent, getComponent, getComponent, getComponent, getFactory, getOptionalComponent, getOrCreateComponent, getOrCreateComponent, getRegisteredComponents, getStatus, lookupComponent, registerComponent, registerComponent, registerComponent, registerComponentInternal, registerDefaultClassLoader, registerNonVolatileComponent, registerNonVolatileComponent, registerNullComponent, removeShutdownHook, resetVolatileComponents, rewire, stop, throwStackAwareConfigurationException, wireDependencies
-
-
-
-
Constructor Detail
-
ComponentRegistry
public ComponentRegistry(String cacheName, Configuration configuration, AdvancedCache<?,?> cache, GlobalComponentRegistry globalComponents, ClassLoader defaultClassLoader)
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
-
-
Method Detail
-
getClassLoader
protected ClassLoader getClassLoader()
- Specified by:
getClassLoader
in classAbstractComponentRegistry
-
getLog
protected org.infinispan.util.logging.Log getLog()
- Specified by:
getLog
in classAbstractComponentRegistry
-
getComponent
public final <T> T getComponent(String componentTypeName, String name, boolean nameIsFQCN)
- Overrides:
getComponent
in classAbstractComponentRegistry
-
getLocalComponent
public final <T> T getLocalComponent(String componentTypeName, String name, boolean nameIsFQCN)
-
getLocalComponent
public final <T> T getLocalComponent(Class<T> componentType)
-
lookupLocalComponent
protected final AbstractComponentRegistry.Component lookupLocalComponent(String componentClassName, String name, boolean nameIsFQCN)
-
getGlobalComponentRegistry
public final GlobalComponentRegistry getGlobalComponentRegistry()
-
getOrCreateComponent
protected final <T> T getOrCreateComponent(Class<T> componentClass, String name, boolean nameIsFQCN)
- Overrides:
getOrCreateComponent
in classAbstractComponentRegistry
-
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 interfaceLifecycle
- Overrides:
start
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
-
getTimeService
public TimeService getTimeService()
- Specified by:
getTimeService
in classAbstractComponentRegistry
-
getCacheName
public String getCacheName()
-
getCacheMarshaller
public StreamingMarshaller getCacheMarshaller()
Caching shortcut for #getComponent(StreamingMarshaller.class, KnownComponentNames.CACHE_MARSHALLER);
-
getStateTransferManager
public StateTransferManager getStateTransferManager()
Caching shortcut for #getComponent(StateTransferManager.class);
-
getDistributionManager
public DistributionManager getDistributionManager()
Caching shortcut for #getComponent(DistributionManager.class);
-
getResponseGenerator
public ResponseGenerator getResponseGenerator()
Caching shortcut for #getComponent(ResponseGenerator.class);
-
getCommandsFactory
public org.infinispan.commands.CommandsFactory getCommandsFactory()
Caching shortcut for #getLocalComponent(CommandsFactory.class);
-
getStateTransferLock
public StateTransferLock getStateTransferLock()
Caching shortcut for #getComponent(StateTransferManager.class);
-
getVersionGenerator
public VersionGenerator getVersionGenerator()
Caching shortcut for #getLocalComponent(VersionGenerator.class)
-
getPerCacheInboundInvocationHandler
public PerCacheInboundInvocationHandler getPerCacheInboundInvocationHandler()
Caching shortcut for #getComponent(PerCacheInboundInvocationHandler.class);
-
bootstrapComponents
protected void bootstrapComponents()
Invoked before anyModuleCommandInitializer
. This is a good place to register components that don't have any dependency.
-
cacheComponents
public void cacheComponents()
Invoked last after all services are wired
-
getComponentMetadataRepo
public ComponentMetadataRepo getComponentMetadataRepo()
- Specified by:
getComponentMetadataRepo
in classAbstractComponentRegistry
-
getConfiguration
public Configuration getConfiguration()
Description copied from class:AbstractComponentRegistry
Retrieves the configuration component.- Overrides:
getConfiguration
in classAbstractComponentRegistry
- Returns:
- a Configuration object
-
getTransactionTable
public final TransactionTable getTransactionTable()
-
registerVersionGenerator
public final void registerVersionGenerator(NumericVersionGenerator newVersionGenerator)
-
-