Package org.infinispan.factories
Class ComponentRegistry
java.lang.Object
org.infinispan.factories.AbstractComponentRegistry
org.infinispan.factories.ComponentRegistry
- All Implemented Interfaces:
Lifecycle
Named cache specific components
- Since:
- 4.0
- Author:
- Manik Surtani
-
Field Summary
Fields inherited from class org.infinispan.factories.AbstractComponentRegistry
state
-
Constructor Summary
ConstructorDescriptionComponentRegistry
(String cacheName, Configuration configuration, AdvancedCache<?, ?> cache, GlobalComponentRegistry globalComponents, ClassLoader defaultClassLoader) Creates an instance of the component registry. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
This is a good place to register components that don't have any dependency.void
Invoked last after all services are wiredprotected CompletionStage<Void>
TheComponentRegistry
may delay the start after a cluster shutdown.ComponentRef<org.infinispan.xsite.BackupReceiver>
ComponentRef<org.infinispan.xsite.BackupSender>
getCache()
Deprecated, for removal: This API element is subject to removal in a future version.protected ClassLoader
Caching shortcut for #getLocalComponent(CommandsFactory.class);final <T> T
getComponent
(String componentTypeName, String name, boolean nameIsFQCN) ComponentRef<org.infinispan.conflict.impl.InternalConflictManager>
Caching shortcut for #getComponent(DistributionManager.class);final GlobalComponentRegistry
Caching shortcut for #getComponent(StreamingMarshaller.class, INTERNAL_MARSHALLER);final <T> T
getLocalComponent
(Class<T> componentType) final <T> T
getLocalComponent
(String componentTypeName, String name, boolean nameIsFQCN) protected org.infinispan.util.logging.Log
getLog()
protected String
getName()
protected final <T> T
getOrCreateComponent
(Class<T> componentClass, String name, boolean nameIsFQCN) ComponentRef<org.infinispan.persistence.manager.OrderedUpdatesManager>
org.infinispan.remoting.inboundhandler.PerCacheInboundInvocationHandler
Caching shortcut for #getComponent(PerCacheInboundInvocationHandler.class);Caching shortcut for #getComponent(PersistenceMarshaller.class, PERSISTENCE_MARSHALLER);Caching shortcut for #getComponent(ResponseGenerator.class);org.infinispan.statetransfer.StateTransferLock
Caching shortcut for #getComponent(StateTransferManager.class);org.infinispan.statetransfer.StateTransferManager
Caching shortcut for #getComponent(StateTransferManager.class);final TransactionTable
final ComponentRef<TransactionTable>
Caching shortcut for #getLocalComponent(VersionGenerator.class)protected void
protected void
postStop()
protected void
preStart()
protected void
preStop()
final 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, wireDependencies
-
Constructor Details
-
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 Details
-
getClassLoader
- Specified by:
getClassLoader
in classAbstractComponentRegistry
-
getLog
protected org.infinispan.util.logging.Log getLog()- Specified by:
getLog
in classAbstractComponentRegistry
-
getComponent
- Overrides:
getComponent
in classAbstractComponentRegistry
-
getLocalComponent
-
getLocalComponent
-
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
-
delayStart
TheComponentRegistry
may delay the start after a cluster shutdown. The component waits for the installation of the previous stable topology to start. Caches that do not need state transfer or are private do not need to delay the start.- Specified by:
delayStart
in classAbstractComponentRegistry
-
getName
- Specified by:
getName
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
- Specified by:
getTimeService
in classAbstractComponentRegistry
-
getCacheName
-
getCacheMarshaller
Deprecated, for removal: This API element is subject to removal in a future version. -
getInternalMarshaller
Caching shortcut for #getComponent(StreamingMarshaller.class, INTERNAL_MARSHALLER); -
getPersistenceMarshaller
Caching shortcut for #getComponent(PersistenceMarshaller.class, PERSISTENCE_MARSHALLER); -
getStateTransferManager
public org.infinispan.statetransfer.StateTransferManager getStateTransferManager()Caching shortcut for #getComponent(StateTransferManager.class); -
getDistributionManager
Caching shortcut for #getComponent(DistributionManager.class); -
getResponseGenerator
Caching shortcut for #getComponent(ResponseGenerator.class); -
getCommandsFactory
Caching shortcut for #getLocalComponent(CommandsFactory.class); -
getStateTransferLock
public org.infinispan.statetransfer.StateTransferLock getStateTransferLock()Caching shortcut for #getComponent(StateTransferManager.class); -
getVersionGenerator
Caching shortcut for #getLocalComponent(VersionGenerator.class) -
getPerCacheInboundInvocationHandler
public org.infinispan.remoting.inboundhandler.PerCacheInboundInvocationHandler getPerCacheInboundInvocationHandler()Caching shortcut for #getComponent(PerCacheInboundInvocationHandler.class); -
bootstrapComponents
protected void bootstrapComponents()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
-
getTransactionTableRef
-
registerVersionGenerator
-
getCache
-
getInterceptorChain
-
getBackupSender
-
getBlockingManager
-
getClusterPublisherManager
-
getLocalClusterPublisherManager
-
getTakeOfflineManager
-
getIracManager
-
getIracVersionGenerator
-
getIracTombstoneManager
-
getBiasManager
-
getCacheByteString
-
getCacheNotifier
-
getConfiguration
-
getConflictManager
-
getClusterCacheNotifier
-
getCommandAckCollector
-
getInternalDataContainer
-
getInternalEntryFactory
-
getInvocationContextFactory
-
getLocalPublisherManager
-
getPublisherHandler
-
getLockManager
-
getOrderedUpdatesManager
public ComponentRef<org.infinispan.persistence.manager.OrderedUpdatesManager> getOrderedUpdatesManager() -
getRecoveryManager
-
getRpcManager
-
getXSiteStateTransferManager
-
getBackupReceiver
-