org.infinispan.factories
Class ComponentRegistry

java.lang.Object
  extended by org.infinispan.factories.AbstractComponentRegistry
      extended by org.infinispan.factories.ComponentRegistry
All Implemented Interfaces:
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, moduleLifecycles, state
 
Constructor Summary
ComponentRegistry(String cacheName, Configuration configuration, AdvancedCache cache, GlobalComponentRegistry globalComponents, ReflectionCache reflectionCache)
          Creates an instance of the component registry.
 
Method Summary
 String getCacheName()
           
<T> T
getComponent(Class<T> componentType, String name)
           
protected  Map<Class,Class<? extends AbstractComponentFactory>> getDefaultFactoryMap()
           
 GlobalComponentRegistry getGlobalComponentRegistry()
           
<T> T
getLocalComponent(Class<T> componentType)
           
<T> T
getLocalComponent(Class<T> componentType, String name)
           
protected  Log getLog()
           
protected  AbstractComponentRegistry.Component lookupComponent(Class componentClass, String name)
           
protected  AbstractComponentRegistry.Component lookupLocalComponent(Class componentClass, String name)
           
protected  void registerComponentInternal(Object component, String name, boolean nonVolatile)
           
 void setCacheManagerNotifier(CacheManagerNotifier cacheManagerNotifier)
           
 void start()
          This starts the components in the cache, connecting to channels, starting service threads, etc.
 void stop()
          Stops the cache and sets the cache status to ComponentStatus.TERMINATED once it is done.
 
Methods inherited from class org.infinispan.factories.AbstractComponentRegistry
addComponentDependencies, addShutdownHook, clone, getComponent, getConfiguration, getFactory, getOrCreateComponent, getOrCreateComponent, getRegisteredComponents, getStatus, invocationsAllowed, invokeInjectionMethod, registerComponent, registerComponent, registerDefaultClassLoader, registerNonVolatileComponent, registerNonVolatileComponent, registerNullComponent, removeShutdownHook, resetVolatileComponents, rewire, wireDependencies
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentRegistry

public ComponentRegistry(String cacheName,
                         Configuration configuration,
                         AdvancedCache cache,
                         GlobalComponentRegistry globalComponents,
                         ReflectionCache reflectionCache)
Creates an instance of the component registry. The configuration passed in is automatically registered.

Parameters:
configuration - configuration with which this is created
cache - cache
globalComponents - Shared Component Registry to delegate to
Method Detail

setCacheManagerNotifier

public void setCacheManagerNotifier(CacheManagerNotifier cacheManagerNotifier)

getLog

protected Log getLog()
Specified by:
getLog in class AbstractComponentRegistry

getComponent

public final <T> T getComponent(Class<T> componentType,
                                String name)
Overrides:
getComponent in class AbstractComponentRegistry

getLocalComponent

public final <T> T getLocalComponent(Class<T> componentType,
                                     String name)

getLocalComponent

public final <T> T getLocalComponent(Class<T> componentType)

getDefaultFactoryMap

protected final Map<Class,Class<? extends AbstractComponentFactory>> getDefaultFactoryMap()
Overrides:
getDefaultFactoryMap in class AbstractComponentRegistry

lookupComponent

protected final AbstractComponentRegistry.Component lookupComponent(Class componentClass,
                                                                    String name)
Overrides:
lookupComponent in class AbstractComponentRegistry

lookupLocalComponent

protected final AbstractComponentRegistry.Component lookupLocalComponent(Class componentClass,
                                                                         String name)

getGlobalComponentRegistry

public final GlobalComponentRegistry getGlobalComponentRegistry()

registerComponentInternal

protected void registerComponentInternal(Object component,
                                         String name,
                                         boolean nonVolatile)
Overrides:
registerComponentInternal in class AbstractComponentRegistry

start

public void start()
Description copied from class: AbstractComponentRegistry
This starts the components in the cache, connecting to channels, starting service threads, etc. If the cache is not in the ComponentStatus.INITIALIZING state, it will be initialized first.

Specified by:
start in interface Lifecycle
Overrides:
start in class AbstractComponentRegistry

stop

public void stop()
Description copied from class: AbstractComponentRegistry
Stops the cache and sets the cache status to ComponentStatus.TERMINATED once it is done. If the cache is not in the ComponentStatus.RUNNING state, this is a no-op.

Specified by:
stop in interface Lifecycle
Overrides:
stop in class AbstractComponentRegistry

getCacheName

public String getCacheName()

-->

Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.