Top Description Fields Constructors Methods
net.sf.ehcache.constructs.readthrough

public Class ReadThroughCacheConfiguration

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
java.util.Properties

This classed is used to programmatically configure a ReadThroughCache.
Author
cschanck

Field Summary

Modifier and TypeField and Description
public static final String
GET_KEY

Properties key for the get() proxy attribute

private boolean
private String
public static final String
NAME_KEY

Properties key for the name attribute

private volatile boolean

Constructor Summary

AccessConstructor and Description
public
ReadThroughCacheConfiguration()

Create default, valid configuration.

Method Summary

Modifier and TypeMethod and Description
public ReadThroughCacheConfiguration
build()

Validate this configuration, mark it valid if it passes.

private void
public ReadThroughCacheConfiguration
fromProperties(Properties properties)

Create a configuration object from a properties object.

public String

Returns:

the name
getName
()

Get the name to set for this cache decorator.

public boolean

Returns:

true if proxied
isModeGet
()

Return whether the get() method is proxied.

public ReadThroughCacheConfiguration
modeGet(boolean
true to proxy get methods
modeGet
)

Set whether get() methods will be transparently proxied.

public ReadThroughCacheConfiguration

Returns:

this config
name
(String
name to use, may be null
name
)

Set the name to set for this cache decorator.

public void
setModeGet(boolean
true t pxoy the get() methods
modeGet
)

Set whether get() methods will be transparently proxied.

public ReadThroughCacheConfiguration

Returns:

this config
setName
(String
name to use, may be null
name
)

Set the name to set for this cache decorator.

public Properties
toProperties()

Return a properties version of this configuration object.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

GET_KEYback to summary
public static final String GET_KEY

Properties key for the get() proxy attribute

modeGetback to summary
private boolean modeGet
nameback to summary
private String name
NAME_KEYback to summary
public static final String NAME_KEY

Properties key for the name attribute

validback to summary
private volatile boolean valid

Constructor Detail

ReadThroughCacheConfigurationback to summary
public ReadThroughCacheConfiguration()

Create default, valid configuration.

Method Detail

buildback to summary
public ReadThroughCacheConfiguration build()

Validate this configuration, mark it valid if it passes.

checkValidback to summary
private void checkValid()
fromPropertiesback to summary
public ReadThroughCacheConfiguration fromProperties(Properties properties)

Create a configuration object from a properties object. Validate before returning.

getNameback to summary
public String getName()

Get the name to set for this cache decorator. May be null.

Returns:String

the name

isModeGetback to summary
public boolean isModeGet()

Return whether the get() method is proxied.

Returns:boolean

true if proxied

modeGetback to summary
public ReadThroughCacheConfiguration modeGet(boolean modeGet)

Set whether get() methods will be transparently proxied.

Parameters
modeGet:boolean

true to proxy get methods

nameback to summary
public ReadThroughCacheConfiguration name(String name)

Set the name to set for this cache decorator. May be null.

Parameters
name:String

name to use, may be null

Returns:ReadThroughCacheConfiguration

this config

setModeGetback to summary
public void setModeGet(boolean modeGet)

Set whether get() methods will be transparently proxied.

Parameters
modeGet:boolean

true t pxoy the get() methods

setNameback to summary
public ReadThroughCacheConfiguration setName(String name)

Set the name to set for this cache decorator. May be null.

Parameters
name:String

name to use, may be null

Returns:ReadThroughCacheConfiguration

this config

toPropertiesback to summary
public Properties toProperties()

Return a properties version of this configuration object.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
validateback to summary
private void validate()