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
ConstructorsConstructorDescriptionComponentRegistry(String cacheName, Configuration configuration, AdvancedCache<?, ?> cache, GlobalComponentRegistry globalComponents, ClassLoader defaultClassLoader) Creates an instance of the component registry. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThis is a good place to register components that don't have any dependency.voidInvoked last after all services are wiredprotected CompletionStage<Void>TheComponentRegistrymay 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 ClassLoaderCaching shortcut for #getLocalComponent(CommandsFactory.class);final <T> TgetComponent(String componentTypeName, String name, boolean nameIsFQCN) ComponentRef<org.infinispan.conflict.impl.InternalConflictManager>Caching shortcut for #getComponent(DistributionManager.class);final GlobalComponentRegistryCaching shortcut for #getComponent(StreamingMarshaller.class, INTERNAL_MARSHALLER);final <T> TgetLocalComponent(Class<T> componentType) final <T> TgetLocalComponent(String componentTypeName, String name, boolean nameIsFQCN) protected org.infinispan.util.logging.LoggetLog()protected StringgetName()protected final <T> TgetOrCreateComponent(Class<T> componentClass, String name, boolean nameIsFQCN) ComponentRef<org.infinispan.persistence.manager.OrderedUpdatesManager>org.infinispan.remoting.inboundhandler.PerCacheInboundInvocationHandlerCaching shortcut for #getComponent(PerCacheInboundInvocationHandler.class);Caching shortcut for #getComponent(PersistenceMarshaller.class, PERSISTENCE_MARSHALLER);Caching shortcut for #getComponent(ResponseGenerator.class);org.infinispan.statetransfer.StateTransferLockCaching shortcut for #getComponent(StateTransferManager.class);org.infinispan.statetransfer.StateTransferManagerCaching shortcut for #getComponent(StateTransferManager.class);final TransactionTablefinal ComponentRef<TransactionTable>Caching shortcut for #getLocalComponent(VersionGenerator.class)protected voidprotected voidpostStop()protected voidpreStart()protected voidpreStop()final voidregisterVersionGenerator(NumericVersionGenerator newVersionGenerator) voidrewire()Rewires components.voidstart()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:
getClassLoaderin classAbstractComponentRegistry
-
getLog
protected org.infinispan.util.logging.Log getLog()- Specified by:
getLogin classAbstractComponentRegistry
-
getComponent
- Overrides:
getComponentin classAbstractComponentRegistry
-
getLocalComponent
-
getLocalComponent
-
getGlobalComponentRegistry
-
getOrCreateComponent
protected final <T> T getOrCreateComponent(Class<T> componentClass, String name, boolean nameIsFQCN) - Overrides:
getOrCreateComponentin classAbstractComponentRegistry
-
start
public void start()Description copied from class:AbstractComponentRegistryThis starts the components in the registry, connecting to channels, starting service threads, etc. If the component is not in theComponentStatus.INITIALIZINGstate, it will be initialized first.- Specified by:
startin interfaceLifecycle- Overrides:
startin classAbstractComponentRegistry
-
delayStart
TheComponentRegistrymay 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:
delayStartin classAbstractComponentRegistry
-
getName
- Specified by:
getNamein classAbstractComponentRegistry
-
preStart
protected void preStart()- Specified by:
preStartin classAbstractComponentRegistry
-
postStart
protected void postStart()- Specified by:
postStartin classAbstractComponentRegistry
-
preStop
protected void preStop()- Specified by:
preStopin classAbstractComponentRegistry
-
postStop
protected void postStop()- Specified by:
postStopin classAbstractComponentRegistry
-
rewire
public void rewire()Description copied from class:AbstractComponentRegistryRewires 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:
rewirein classAbstractComponentRegistry
-
getTimeService
- Specified by:
getTimeServicein 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
-