Top Description Fields Constructors Methods
net.sf.ehcache.bootstrap

public abstract Class BootstrapCacheLoaderFactory<T extends net.sf.ehcache.bootstrap.BootstrapCacheLoader>

extends Object
Class Inheritance
Known Direct Subclasses
net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory, net.sf.ehcache.store.DiskStoreBootstrapCacheLoaderFactory, net.sf.ehcache.terracotta.TerracottaBootstrapCacheLoaderFactory
Type Parameters
<T>
The BootstrapCacheLoader type this Factory will create
Imports
net.sf.ehcache.util.PropertyUtil, java.util.Properties

An abstract factory for creating BootstrapCacheLoader instances. Implementers should provide their own concrete factory extending this factory. It can then be configured in ehcache.xml.
Author
Greg Luck
Version
$Id: BootstrapCacheLoaderFactory.java 5594 2012-05-07 16:04:31Z cdennis $

Field Summary

Modifier and TypeField and Description
public static final String
BOOTSTRAP_ASYNCHRONOUSLY

The property name expected in ehcache.xml for the bootstrap asyncrhonously switch.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract T

Returns:

a constructed BootstrapCacheLoader
createBootstrapCacheLoader
(Properties
implementation specific properties. These are configured as comma separated name value pairs in ehcache.xml
properties
)

Create a BootstrapCacheLoader

protected boolean

Returns:

the value, or it's default, for the property
extractBoolean
(final Properties
the properties to use
properties
,
final String
the property name to look for
prop
,
final boolean
the default value if property is missing
defaultValue
)

Will retrieve the boolean value from the properties, defaulting if property isn't present

protected boolean

Returns:

true if to be bootstrapped asynchronously, false otherwise
extractBootstrapAsynchronously
(Properties
the properties passed by the CacheManager, read from the configuration file
properties
)

Extracts the value of bootstrapAsynchronously from the properties

protected long

Returns:

the value, or it's default, for the property
extractLong
(final Properties
the properties to use
properties
,
final String
the property name to look for
prop
,
final long
the default value if property is missing
defaultValue
)

Will retrieve the boolean value from the properties, defaulting if property isn't present

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BOOTSTRAP_ASYNCHRONOUSLYback to summary
public static final String BOOTSTRAP_ASYNCHRONOUSLY

The property name expected in ehcache.xml for the bootstrap asyncrhonously switch.

Constructor Detail

BootstrapCacheLoaderFactoryback to summary
public BootstrapCacheLoaderFactory()

Method Detail

createBootstrapCacheLoaderback to summary
public abstract T createBootstrapCacheLoader(Properties properties)

Create a BootstrapCacheLoader

Parameters
properties:Properties

implementation specific properties. These are configured as comma separated name value pairs in ehcache.xml

Returns:T

a constructed BootstrapCacheLoader

extractBooleanback to summary
protected boolean extractBoolean(final Properties properties, final String prop, final boolean defaultValue)

Will retrieve the boolean value from the properties, defaulting if property isn't present

Parameters
properties:Properties

the properties to use

prop:String

the property name to look for

defaultValue:boolean

the default value if property is missing

Returns:boolean

the value, or it's default, for the property

extractBootstrapAsynchronouslyback to summary
protected boolean extractBootstrapAsynchronously(Properties properties)

Extracts the value of bootstrapAsynchronously from the properties

Parameters
properties:Properties

the properties passed by the CacheManager, read from the configuration file

Returns:boolean

true if to be bootstrapped asynchronously, false otherwise

extractLongback to summary
protected long extractLong(final Properties properties, final String prop, final long defaultValue)

Will retrieve the boolean value from the properties, defaulting if property isn't present

Parameters
properties:Properties

the properties to use

prop:String

the property name to look for

defaultValue:long

the default value if property is missing

Returns:long

the value, or it's default, for the property