org.infinispan.factories
Class DefaultCacheFactory<K,V>
java.lang.Object
org.infinispan.factories.AbstractComponentFactory
org.infinispan.factories.AbstractNamedCacheComponentFactory
org.infinispan.factories.DefaultCacheFactory<K,V>
public class DefaultCacheFactory<K,V>
- extends AbstractNamedCacheComponentFactory
Default implementation of the CacheFactory
interface.
This is a special instance of a AbstractComponentFactory
which contains bootstrap information for the ComponentRegistry
.
- Since:
- 4.0
- Author:
- Manik Surtani (manik@jboss.org)
- See Also:
AbstractComponentFactory
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCacheFactory
public DefaultCacheFactory()
createCache
public Cache<K,V> createCache(Configuration configuration,
GlobalComponentRegistry globalComponentRegistry,
String cacheName)
throws ConfigurationException
- This implementation clones the configuration passed in before using it.
- Parameters:
configuration
- to usestart
- whether to start the cache
- Returns:
- a cache
- Throws:
ConfigurationException
- if there are problems with the cfg
createDefaultCache
public Cache<K,V> createDefaultCache(Configuration configuration)
throws ConfigurationException
- Throws:
ConfigurationException
createAndWire
protected AdvancedCache<K,V> createAndWire(Configuration configuration,
GlobalComponentRegistry globalComponentRegistry,
String cacheName)
throws Exception
- Throws:
Exception
setDefaultClassLoader
public void setDefaultClassLoader(ClassLoader loader)
- Allows users to specify a default class loader to use for both the construction and running of the cache.
- Parameters:
loader
- class loader to use as a default.
construct
public <T> T construct(Class<T> componentType)
- Description copied from class:
AbstractComponentFactory
- Constructs a component.
- Specified by:
construct
in class AbstractComponentFactory
- Parameters:
componentType
- type of component
- Returns:
- a component
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.