Package org.infinispan.factories
Class ComponentRegistry
- java.lang.Object
-
- org.infinispan.factories.AbstractComponentRegistry
-
- org.infinispan.factories.ComponentRegistry
-
- All Implemented Interfaces:
Lifecycle
public class ComponentRegistry extends AbstractComponentRegistry
Named cache specific components- Since:
- 4.0
- Author:
- Manik Surtani
-
-
Field Summary
-
Fields inherited from class org.infinispan.factories.AbstractComponentRegistry
state
-
-
Constructor Summary
Constructors Constructor Description ComponentRegistry(java.lang.String cacheName, Configuration configuration, AdvancedCache<?,?> cache, GlobalComponentRegistry globalComponents, java.lang.ClassLoader defaultClassLoader)
Creates an instance of the component registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
bootstrapComponents()
Invoked before anyModuleCommandInitializer
.void
cacheComponents()
Invoked last after all services are wiredorg.infinispan.factories.impl.ComponentRef<BackupSender>
getBackupSender()
org.infinispan.factories.impl.ComponentRef<BiasManager>
getBiasManager()
org.infinispan.factories.impl.ComponentRef<AdvancedCache>
getCache()
ByteString
getCacheByteString()
StreamingMarshaller
getCacheMarshaller()
Deprecated.java.lang.String
getCacheName()
org.infinispan.factories.impl.ComponentRef<CacheNotifier>
getCacheNotifier()
org.infinispan.factories.impl.ComponentRef<org.infinispan.commands.CancellationService>
getCancellationService()
protected java.lang.ClassLoader
getClassLoader()
org.infinispan.factories.impl.ComponentRef<ClusterCacheNotifier>
getClusterCacheNotifier()
org.infinispan.factories.impl.ComponentRef<org.infinispan.stream.impl.ClusterStreamManager>
getClusterStreamManager()
org.infinispan.factories.impl.ComponentRef<CommandAckCollector>
getCommandAckCollector()
org.infinispan.commands.CommandsFactory
getCommandsFactory()
Caching shortcut for #getLocalComponent(CommandsFactory.class);<T> T
getComponent(java.lang.String componentTypeName, java.lang.String name, boolean nameIsFQCN)
org.infinispan.factories.impl.ComponentRef<org.infinispan.conflict.impl.InternalConflictManager>
getConflictManager()
DistributionManager
getDistributionManager()
Caching shortcut for #getComponent(DistributionManager.class);GlobalComponentRegistry
getGlobalComponentRegistry()
org.infinispan.factories.impl.ComponentRef<AsyncInterceptorChain>
getInterceptorChain()
org.infinispan.factories.impl.ComponentRef<org.infinispan.container.impl.InternalDataContainer>
getInternalDataContainer()
org.infinispan.factories.impl.ComponentRef<org.infinispan.container.impl.InternalEntryFactory>
getInternalEntryFactory()
StreamingMarshaller
getInternalMarshaller()
Caching shortcut for #getComponent(StreamingMarshaller.class, INTERNAL_MARSHALLER);org.infinispan.factories.impl.ComponentRef<InvocationContextFactory>
getInvocationContextFactory()
<T> T
getLocalComponent(java.lang.Class<T> componentType)
<T> T
getLocalComponent(java.lang.String componentTypeName, java.lang.String name, boolean nameIsFQCN)
org.infinispan.factories.impl.ComponentRef<org.infinispan.reactive.publisher.impl.LocalPublisherManager>
getLocalPublisherManager()
org.infinispan.factories.impl.ComponentRef<org.infinispan.stream.impl.LocalStreamManager>
getLocalStreamManager()
org.infinispan.factories.impl.ComponentRef<LockManager>
getLockManager()
protected org.infinispan.util.logging.Log
getLog()
protected <T> T
getOrCreateComponent(java.lang.Class<T> componentClass, java.lang.String name, boolean nameIsFQCN)
org.infinispan.factories.impl.ComponentRef<OrderedUpdatesManager>
getOrderedUpdatesManager()
PerCacheInboundInvocationHandler
getPerCacheInboundInvocationHandler()
Caching shortcut for #getComponent(PerCacheInboundInvocationHandler.class);PersistenceMarshaller
getPersistenceMarshaller()
Caching shortcut for #getComponent(PersistenceMarshaller.class, PERSISTENCE_MARSHALLER);org.infinispan.factories.impl.ComponentRef<org.infinispan.reactive.publisher.impl.PublisherHandler>
getPublisherHandler()
org.infinispan.factories.impl.ComponentRef<RecoveryManager>
getRecoveryManager()
ResponseGenerator
getResponseGenerator()
Caching shortcut for #getComponent(ResponseGenerator.class);org.infinispan.factories.impl.ComponentRef<RpcManager>
getRpcManager()
StateTransferLock
getStateTransferLock()
Caching shortcut for #getComponent(StateTransferManager.class);StateTransferManager
getStateTransferManager()
Caching shortcut for #getComponent(StateTransferManager.class);TimeService
getTimeService()
org.infinispan.transaction.impl.TransactionTable
getTransactionTable()
org.infinispan.factories.impl.ComponentRef<org.infinispan.transaction.impl.TransactionTable>
getTransactionTableRef()
VersionGenerator
getVersionGenerator()
Caching shortcut for #getLocalComponent(VersionGenerator.class)org.infinispan.factories.impl.ComponentRef<XSiteStateTransferManager>
getXSiteStateTransferManager()
protected void
postStart()
protected void
postStop()
protected void
preStart()
protected void
preStop()
void
registerVersionGenerator(NumericVersionGenerator newVersionGenerator)
void
rewire()
Rewires components.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, getComponent, getComponent, getComponent, getComponent, getOptionalComponent, getOrCreateComponent, getOrCreateComponent, getStatus, registerComponent, registerComponent, registerComponent, registerComponentInternal, registerDefaultClassLoader, registerNonVolatileComponent, removeShutdownHook, stop, wireDependencies
-
-
-
-
Constructor Detail
-
ComponentRegistry
public ComponentRegistry(java.lang.String cacheName, Configuration configuration, AdvancedCache<?,?> cache, GlobalComponentRegistry globalComponents, java.lang.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 java.lang.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(java.lang.String componentTypeName, java.lang.String name, boolean nameIsFQCN)
- Overrides:
getComponent
in classAbstractComponentRegistry
-
getLocalComponent
public final <T> T getLocalComponent(java.lang.String componentTypeName, java.lang.String name, boolean nameIsFQCN)
-
getLocalComponent
public final <T> T getLocalComponent(java.lang.Class<T> componentType)
-
getGlobalComponentRegistry
public final GlobalComponentRegistry getGlobalComponentRegistry()
-
getOrCreateComponent
protected final <T> T getOrCreateComponent(java.lang.Class<T> componentClass, java.lang.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
-
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
-
getTimeService
public TimeService getTimeService()
- Specified by:
getTimeService
in classAbstractComponentRegistry
-
getCacheName
public java.lang.String getCacheName()
-
getCacheMarshaller
@Deprecated public StreamingMarshaller getCacheMarshaller()
Deprecated.
-
getInternalMarshaller
public StreamingMarshaller getInternalMarshaller()
Caching shortcut for #getComponent(StreamingMarshaller.class, INTERNAL_MARSHALLER);
-
getPersistenceMarshaller
public PersistenceMarshaller getPersistenceMarshaller()
Caching shortcut for #getComponent(PersistenceMarshaller.class, PERSISTENCE_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
-
getTransactionTable
public final org.infinispan.transaction.impl.TransactionTable getTransactionTable()
-
getTransactionTableRef
public final org.infinispan.factories.impl.ComponentRef<org.infinispan.transaction.impl.TransactionTable> getTransactionTableRef()
-
registerVersionGenerator
public final void registerVersionGenerator(NumericVersionGenerator newVersionGenerator)
-
getCache
public org.infinispan.factories.impl.ComponentRef<AdvancedCache> getCache()
-
getInterceptorChain
public org.infinispan.factories.impl.ComponentRef<AsyncInterceptorChain> getInterceptorChain()
-
getBackupSender
public org.infinispan.factories.impl.ComponentRef<BackupSender> getBackupSender()
-
getBiasManager
public org.infinispan.factories.impl.ComponentRef<BiasManager> getBiasManager()
-
getCacheByteString
public ByteString getCacheByteString()
-
getCacheNotifier
public org.infinispan.factories.impl.ComponentRef<CacheNotifier> getCacheNotifier()
-
getCancellationService
public org.infinispan.factories.impl.ComponentRef<org.infinispan.commands.CancellationService> getCancellationService()
-
getConflictManager
public org.infinispan.factories.impl.ComponentRef<org.infinispan.conflict.impl.InternalConflictManager> getConflictManager()
-
getClusterCacheNotifier
public org.infinispan.factories.impl.ComponentRef<ClusterCacheNotifier> getClusterCacheNotifier()
-
getClusterStreamManager
public org.infinispan.factories.impl.ComponentRef<org.infinispan.stream.impl.ClusterStreamManager> getClusterStreamManager()
-
getCommandAckCollector
public org.infinispan.factories.impl.ComponentRef<CommandAckCollector> getCommandAckCollector()
-
getInternalDataContainer
public org.infinispan.factories.impl.ComponentRef<org.infinispan.container.impl.InternalDataContainer> getInternalDataContainer()
-
getInternalEntryFactory
public org.infinispan.factories.impl.ComponentRef<org.infinispan.container.impl.InternalEntryFactory> getInternalEntryFactory()
-
getInvocationContextFactory
public org.infinispan.factories.impl.ComponentRef<InvocationContextFactory> getInvocationContextFactory()
-
getLocalPublisherManager
public org.infinispan.factories.impl.ComponentRef<org.infinispan.reactive.publisher.impl.LocalPublisherManager> getLocalPublisherManager()
-
getPublisherHandler
public org.infinispan.factories.impl.ComponentRef<org.infinispan.reactive.publisher.impl.PublisherHandler> getPublisherHandler()
-
getLocalStreamManager
public org.infinispan.factories.impl.ComponentRef<org.infinispan.stream.impl.LocalStreamManager> getLocalStreamManager()
-
getLockManager
public org.infinispan.factories.impl.ComponentRef<LockManager> getLockManager()
-
getOrderedUpdatesManager
public org.infinispan.factories.impl.ComponentRef<OrderedUpdatesManager> getOrderedUpdatesManager()
-
getRecoveryManager
public org.infinispan.factories.impl.ComponentRef<RecoveryManager> getRecoveryManager()
-
getRpcManager
public org.infinispan.factories.impl.ComponentRef<RpcManager> getRpcManager()
-
getXSiteStateTransferManager
public org.infinispan.factories.impl.ComponentRef<XSiteStateTransferManager> getXSiteStateTransferManager()
-
-