Package org.infinispan.factories
Class ComponentRegistry
- java.lang.Object
-
- org.infinispan.factories.AbstractComponentRegistry
-
- org.infinispan.factories.ComponentRegistry
-
- All Implemented Interfaces:
java.lang.Cloneable,Lifecycle
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(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 voidbootstrapComponents()Invoked before anyModuleCommandInitializer.voidcacheComponents()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()ByteStringgetCacheByteString()StreamingMarshallergetCacheMarshaller()Deprecated.java.lang.StringgetCacheName()org.infinispan.factories.impl.ComponentRef<CacheNotifier>getCacheNotifier()org.infinispan.factories.impl.ComponentRef<org.infinispan.commands.CancellationService>getCancellationService()protected java.lang.ClassLoadergetClassLoader()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.CommandsFactorygetCommandsFactory()Caching shortcut for #getLocalComponent(CommandsFactory.class);<T> TgetComponent(java.lang.String componentTypeName, java.lang.String name, boolean nameIsFQCN)ComponentMetadataRepogetComponentMetadataRepo()org.infinispan.factories.impl.ComponentRef<org.infinispan.conflict.impl.InternalConflictManager>getConflictManager()DistributionManagergetDistributionManager()Caching shortcut for #getComponent(DistributionManager.class);GlobalComponentRegistrygetGlobalComponentRegistry()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()StreamingMarshallergetInternalMarshaller()Caching shortcut for #getComponent(StreamingMarshaller.class, INTERNAL_MARSHALLER);org.infinispan.factories.impl.ComponentRef<InvocationContextFactory>getInvocationContextFactory()<T> TgetLocalComponent(java.lang.Class<T> componentType)<T> TgetLocalComponent(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.LoggetLog()protected <T> TgetOrCreateComponent(java.lang.Class<T> componentClass, java.lang.String name, boolean nameIsFQCN)org.infinispan.factories.impl.ComponentRef<OrderedUpdatesManager>getOrderedUpdatesManager()PerCacheInboundInvocationHandlergetPerCacheInboundInvocationHandler()Caching shortcut for #getComponent(PerCacheInboundInvocationHandler.class);PersistenceMarshallergetPersistenceMarshaller()Caching shortcut for #getComponent(PersistenceMarshaller.class, PERSISTENCE_MARSHALLER);org.infinispan.factories.impl.ComponentRef<RecoveryManager>getRecoveryManager()ResponseGeneratorgetResponseGenerator()Caching shortcut for #getComponent(ResponseGenerator.class);org.infinispan.factories.impl.ComponentRef<RpcManager>getRpcManager()StateTransferLockgetStateTransferLock()Caching shortcut for #getComponent(StateTransferManager.class);StateTransferManagergetStateTransferManager()Caching shortcut for #getComponent(StateTransferManager.class);TimeServicegetTimeService()org.infinispan.transaction.impl.TransactionTablegetTransactionTable()org.infinispan.factories.impl.ComponentRef<org.infinispan.transaction.impl.TransactionTable>getTransactionTableRef()VersionGeneratorgetVersionGenerator()Caching shortcut for #getLocalComponent(VersionGenerator.class)org.infinispan.factories.impl.ComponentRef<XSiteStateTransferManager>getXSiteStateTransferManager()protected AbstractComponentRegistry.ComponentlookupLocalComponent(java.lang.String componentClassName, java.lang.String name, boolean nameIsFQCN)protected voidpostStart()protected voidpostStop()protected voidpreStart()protected voidpreStop()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, clone, createComponentFactoryInternal, getComponent, getComponent, getComponent, getComponent, getFactory, getOptionalComponent, getOrCreateComponent, getOrCreateComponent, getRegisteredComponents, getStatus, lookupComponent, registerComponent, registerComponent, registerComponent, registerComponentInternal, registerDefaultClassLoader, registerNonVolatileComponent, registerNonVolatileComponent, registerNullComponent, removeShutdownHook, resetVolatileComponents, stop, throwStackAwareConfigurationException, 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:
getClassLoaderin classAbstractComponentRegistry
-
getLog
protected org.infinispan.util.logging.Log getLog()
- Specified by:
getLogin classAbstractComponentRegistry
-
getComponent
public final <T> T getComponent(java.lang.String componentTypeName, java.lang.String name, boolean nameIsFQCN)- Overrides:
getComponentin 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)
-
lookupLocalComponent
protected final AbstractComponentRegistry.Component lookupLocalComponent(java.lang.String componentClassName, java.lang.String name, boolean nameIsFQCN)
-
getGlobalComponentRegistry
public final GlobalComponentRegistry getGlobalComponentRegistry()
-
getOrCreateComponent
protected final <T> T getOrCreateComponent(java.lang.Class<T> componentClass, java.lang.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
-
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 TimeService getTimeService()
- Specified by:
getTimeServicein 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
-
getComponentMetadataRepo
public ComponentMetadataRepo getComponentMetadataRepo()
- Specified by:
getComponentMetadataRepoin classAbstractComponentRegistry
-
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()
-
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()
-
-