Package net.sf.ehcache.bootstrap
Class BootstrapCacheLoaderFactory<T extends BootstrapCacheLoader>
- java.lang.Object
-
- net.sf.ehcache.bootstrap.BootstrapCacheLoaderFactory<T>
-
- Type Parameters:
T- The BootstrapCacheLoader type this Factory will create
- Direct Known Subclasses:
DiskStoreBootstrapCacheLoaderFactory,RMIBootstrapCacheLoaderFactory,TerracottaBootstrapCacheLoaderFactory
public abstract class BootstrapCacheLoaderFactory<T extends BootstrapCacheLoader> extends java.lang.ObjectAn abstract factory for creating BootstrapCacheLoader instances. Implementers should provide their own concrete factory extending this factory. It can then be configured in ehcache.xml.- Version:
- $Id$
- Author:
- Greg Luck
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBOOTSTRAP_ASYNCHRONOUSLYThe property name expected in ehcache.xml for the bootstrap asyncrhonously switch.
-
Constructor Summary
Constructors Constructor Description BootstrapCacheLoaderFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract TcreateBootstrapCacheLoader(java.util.Properties properties)Create aBootstrapCacheLoaderprotected booleanextractBoolean(java.util.Properties properties, java.lang.String prop, boolean defaultValue)Will retrieve the boolean value from the properties, defaulting if property isn't presentprotected booleanextractBootstrapAsynchronously(java.util.Properties properties)Extracts the value of bootstrapAsynchronously from the propertiesprotected longextractLong(java.util.Properties properties, java.lang.String prop, long defaultValue)Will retrieve the boolean value from the properties, defaulting if property isn't present
-
-
-
Field Detail
-
BOOTSTRAP_ASYNCHRONOUSLY
public static final java.lang.String BOOTSTRAP_ASYNCHRONOUSLY
The property name expected in ehcache.xml for the bootstrap asyncrhonously switch.- See Also:
- Constant Field Values
-
-
Method Detail
-
createBootstrapCacheLoader
public abstract T createBootstrapCacheLoader(java.util.Properties properties)
Create aBootstrapCacheLoader- Parameters:
properties- implementation specific properties. These are configured as comma separated name value pairs in ehcache.xml- Returns:
- a constructed BootstrapCacheLoader
-
extractBootstrapAsynchronously
protected boolean extractBootstrapAsynchronously(java.util.Properties properties)
Extracts the value of bootstrapAsynchronously from the properties- Parameters:
properties- the properties passed by the CacheManager, read from the configuration file- Returns:
- true if to be bootstrapped asynchronously, false otherwise
-
extractBoolean
protected boolean extractBoolean(java.util.Properties properties, java.lang.String prop, boolean defaultValue)Will retrieve the boolean value from the properties, defaulting if property isn't present- Parameters:
properties- the properties to useprop- the property name to look fordefaultValue- the default value if property is missing- Returns:
- the value, or it's default, for the property
-
extractLong
protected long extractLong(java.util.Properties properties, java.lang.String prop, long defaultValue)Will retrieve the boolean value from the properties, defaulting if property isn't present- Parameters:
properties- the properties to useprop- the property name to look fordefaultValue- the default value if property is missing- Returns:
- the value, or it's default, for the property
-
-