Package org.infinispan.factories
Class ComponentRegistry
java.lang.Object
org.infinispan.factories.AbstractComponentRegistry
org.infinispan.factories.ComponentRegistry
- All Implemented Interfaces:
org.infinispan.commons.api.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.getCache()org.infinispan.commons.marshall.StreamingMarshallerDeprecated.protected ClassLoaderCaching shortcut for #getLocalComponent(CommandsFactory.class);final <T> TgetComponent(String componentTypeName, String name, boolean nameIsFQCN) Caching shortcut for #getComponent(DistributionManager.class);final GlobalComponentRegistryorg.infinispan.commons.marshall.StreamingMarshallerCaching shortcut for #getComponent(StreamingMarshaller.class, INTERNAL_MARSHALLER);final <T> TgetLocalComponent(Class<T> componentType) final <T> TgetLocalComponent(String componentTypeName, String name, boolean nameIsFQCN) protected LoggetLog()protected StringgetName()protected final <T> TgetOrCreateComponent(Class<T> componentClass, String name, boolean nameIsFQCN) Caching shortcut for #getComponent(PerCacheInboundInvocationHandler.class);Caching shortcut for #getComponent(PersistenceMarshaller.class, PERSISTENCE_MARSHALLER);Caching shortcut for #getComponent(ResponseGenerator.class);Caching shortcut for #getComponent(StateTransferManager.class);Caching shortcut for #getComponent(StateTransferManager.class);org.infinispan.commons.time.TimeServicefinal 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
- 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 interfaceorg.infinispan.commons.api.Lifecycle- 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
public org.infinispan.commons.time.TimeService getTimeService()- Specified by:
getTimeServicein classAbstractComponentRegistry
-
getCacheName
-
getCacheMarshaller
Deprecated. -
getInternalMarshaller
public org.infinispan.commons.marshall.StreamingMarshaller getInternalMarshaller()Caching shortcut for #getComponent(StreamingMarshaller.class, INTERNAL_MARSHALLER); -
getPersistenceMarshaller
Caching shortcut for #getComponent(PersistenceMarshaller.class, PERSISTENCE_MARSHALLER); -
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
Caching shortcut for #getComponent(StateTransferManager.class); -
getVersionGenerator
Caching shortcut for #getLocalComponent(VersionGenerator.class) -
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
-
getRecoveryManager
-
getRpcManager
-
getXSiteStateTransferManager
-
getBackupReceiver
-