Package org.infinispan.factories
Class ComponentRegistry
- java.lang.Object
-
- org.infinispan.factories.AbstractComponentRegistry
-
- org.infinispan.factories.ComponentRegistry
-
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(String cacheName, Configuration configuration, AdvancedCache<?,?> cache, GlobalComponentRegistry globalComponents, ClassLoader defaultClassLoader)Creates an instance of the component registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbootstrapComponents()Invoked before anyModuleCommandInitializer.voidcacheComponents()Invoked last after all services are wiredStreamingMarshallergetCacheMarshaller()Caching shortcut for #getComponent(StreamingMarshaller.class, KnownComponentNames.CACHE_MARSHALLER);StringgetCacheName()protected ClassLoadergetClassLoader()org.infinispan.commands.CommandsFactorygetCommandsFactory()Caching shortcut for #getLocalComponent(CommandsFactory.class);<T> TgetComponent(String componentTypeName, String name, boolean nameIsFQCN)ComponentMetadataRepogetComponentMetadataRepo()ConfigurationgetConfiguration()Retrieves the configuration component.DistributionManagergetDistributionManager()Caching shortcut for #getComponent(DistributionManager.class);GlobalComponentRegistrygetGlobalComponentRegistry()<T> TgetLocalComponent(Class<T> componentType)<T> TgetLocalComponent(String componentTypeName, String name, boolean nameIsFQCN)protected org.infinispan.util.logging.LoggetLog()protected <T> TgetOrCreateComponent(Class<T> componentClass, String name, boolean nameIsFQCN)PerCacheInboundInvocationHandlergetPerCacheInboundInvocationHandler()Caching shortcut for #getComponent(PerCacheInboundInvocationHandler.class);ResponseGeneratorgetResponseGenerator()Caching shortcut for #getComponent(ResponseGenerator.class);StateTransferLockgetStateTransferLock()Caching shortcut for #getComponent(StateTransferManager.class);StateTransferManagergetStateTransferManager()Caching shortcut for #getComponent(StateTransferManager.class);TimeServicegetTimeService()TransactionTablegetTransactionTable()VersionGeneratorgetVersionGenerator()Caching shortcut for #getLocalComponent(VersionGenerator.class)protected AbstractComponentRegistry.ComponentlookupLocalComponent(String componentClassName, String name, boolean nameIsFQCN)protected voidpostStart()protected voidpostStop()protected voidpreStart()protected voidpreStop()voidregisterVersionGenerator(NumericVersionGenerator newVersionGenerator)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, rewire, stop, throwStackAwareConfigurationException, wireDependencies
-
-
-
-
Constructor Detail
-
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 Detail
-
getClassLoader
protected ClassLoader getClassLoader()
- Specified by:
getClassLoaderin classAbstractComponentRegistry
-
getLog
protected org.infinispan.util.logging.Log getLog()
- Specified by:
getLogin classAbstractComponentRegistry
-
getComponent
public final <T> T getComponent(String componentTypeName, String name, boolean nameIsFQCN)
- Overrides:
getComponentin classAbstractComponentRegistry
-
getLocalComponent
public final <T> T getLocalComponent(String componentTypeName, String name, boolean nameIsFQCN)
-
getLocalComponent
public final <T> T getLocalComponent(Class<T> componentType)
-
lookupLocalComponent
protected final AbstractComponentRegistry.Component lookupLocalComponent(String componentClassName, String name, boolean nameIsFQCN)
-
getGlobalComponentRegistry
public final GlobalComponentRegistry 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
-
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
-
getTimeService
public TimeService getTimeService()
- Specified by:
getTimeServicein classAbstractComponentRegistry
-
getCacheName
public String getCacheName()
-
getCacheMarshaller
public StreamingMarshaller getCacheMarshaller()
Caching shortcut for #getComponent(StreamingMarshaller.class, KnownComponentNames.CACHE_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
-
getConfiguration
public Configuration getConfiguration()
Description copied from class:AbstractComponentRegistryRetrieves the configuration component.- Overrides:
getConfigurationin classAbstractComponentRegistry- Returns:
- a Configuration object
-
getTransactionTable
public final TransactionTable getTransactionTable()
-
registerVersionGenerator
public final void registerVersionGenerator(NumericVersionGenerator newVersionGenerator)
-
-