org.infinispan.factories
Class GlobalComponentRegistry

java.lang.Object
  extended by org.infinispan.factories.AbstractComponentRegistry
      extended by org.infinispan.factories.GlobalComponentRegistry
All Implemented Interfaces:
Cloneable, Lifecycle

public class GlobalComponentRegistry
extends AbstractComponentRegistry

A global component registry where shared components are stored.

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
GlobalComponentRegistry(GlobalConfiguration configuration, EmbeddedCacheManager cacheManager, ReflectionCache reflectionCache, Set<String> createdCaches)
          Creates an instance of the component registry.
 
Method Summary
protected  void addShutdownHook()
           
 GlobalConfiguration getGlobalConfiguration()
           
protected  Log getLog()
           
 ComponentRegistry getNamedComponentRegistry(String name)
           
 void registerNamedComponentRegistry(ComponentRegistry componentRegistry, String name)
           
 boolean removeCache(String cacheName)
          Removes a cache with the given name, returning true if the cache was removed.
protected  void removeShutdownHook()
           
 void rewireNamedRegistries()
           
 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.
 void unregisterNamedComponentRegistry(String name)
           
 
Methods inherited from class org.infinispan.factories.AbstractComponentRegistry
addComponentDependencies, clone, getComponent, getComponent, getConfiguration, getDefaultFactoryMap, getFactory, getOrCreateComponent, getOrCreateComponent, getRegisteredComponents, getStatus, invocationsAllowed, invokeInjectionMethod, lookupComponent, registerComponent, registerComponent, registerComponentInternal, registerDefaultClassLoader, registerNonVolatileComponent, registerNonVolatileComponent, registerNullComponent, resetVolatileComponents, rewire, wireDependencies
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalComponentRegistry

public GlobalComponentRegistry(GlobalConfiguration configuration,
                               EmbeddedCacheManager cacheManager,
                               ReflectionCache reflectionCache,
                               Set<String> createdCaches)
Creates an instance of the component registry. The configuration passed in is automatically registered.

Parameters:
configuration - configuration with which this is created
Method Detail

getLog

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

removeShutdownHook

protected void removeShutdownHook()
Overrides:
removeShutdownHook in class AbstractComponentRegistry

addShutdownHook

protected void addShutdownHook()
Overrides:
addShutdownHook in class AbstractComponentRegistry

getNamedComponentRegistry

public final ComponentRegistry getNamedComponentRegistry(String name)

registerNamedComponentRegistry

public final void registerNamedComponentRegistry(ComponentRegistry componentRegistry,
                                                 String name)

unregisterNamedComponentRegistry

public final void unregisterNamedComponentRegistry(String name)

rewireNamedRegistries

public final void rewireNamedRegistries()

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

getGlobalConfiguration

public final GlobalConfiguration getGlobalConfiguration()

removeCache

public boolean removeCache(String cacheName)
Removes a cache with the given name, returning true if the cache was removed.


-->

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