Class ReadThroughCacheConfiguration
- java.lang.Object
-
- net.sf.ehcache.constructs.readthrough.ReadThroughCacheConfiguration
-
- All Implemented Interfaces:
java.lang.Cloneable
public class ReadThroughCacheConfiguration extends java.lang.Object implements java.lang.CloneableThis classed is used to programmatically configure aReadThroughCache.- Author:
- cschanck
-
-
Constructor Summary
Constructors Constructor Description ReadThroughCacheConfiguration()Create default, valid configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReadThroughCacheConfigurationbuild()Validate this configuration, mark it valid if it passes.ReadThroughCacheConfigurationfromProperties(java.util.Properties properties)Create a configuration object from a properties object.java.lang.StringgetName()Get the name to set for this cache decorator.booleanisModeGet()Return whether the get() method is proxied.ReadThroughCacheConfigurationmodeGet(boolean modeGet)Set whether get() methods will be transparently proxied.ReadThroughCacheConfigurationname(java.lang.String name)Set the name to set for this cache decorator.voidsetModeGet(boolean modeGet)Set whether get() methods will be transparently proxied.ReadThroughCacheConfigurationsetName(java.lang.String name)Set the name to set for this cache decorator.java.util.PropertiestoProperties()Return a properties version of this configuration object.java.lang.StringtoString()
-
-
-
Field Detail
-
NAME_KEY
public static final java.lang.String NAME_KEY
Properties key for the name attribute- See Also:
- Constant Field Values
-
GET_KEY
public static final java.lang.String GET_KEY
Properties key for the get() proxy attribute- See Also:
- Constant Field Values
-
-
Method Detail
-
fromProperties
public ReadThroughCacheConfiguration fromProperties(java.util.Properties properties)
Create a configuration object from a properties object. Validate before returning.- Parameters:
properties-- Returns:
-
toProperties
public java.util.Properties toProperties()
Return a properties version of this configuration object.- Returns:
-
build
public ReadThroughCacheConfiguration build()
Validate this configuration, mark it valid if it passes.- Returns:
-
modeGet
public ReadThroughCacheConfiguration modeGet(boolean modeGet)
Set whether get() methods will be transparently proxied.- Parameters:
modeGet- true to proxy get methods- Returns:
-
isModeGet
public boolean isModeGet()
Return whether the get() method is proxied.- Returns:
- true if proxied
-
setModeGet
public void setModeGet(boolean modeGet)
Set whether get() methods will be transparently proxied.- Parameters:
modeGet- true t pxoy the get() methods
-
getName
public java.lang.String getName()
Get the name to set for this cache decorator. May be null.- Returns:
- the name
-
setName
public ReadThroughCacheConfiguration setName(java.lang.String name)
Set the name to set for this cache decorator. May be null.- Parameters:
name- name to use, may be null- Returns:
- this config
-
name
public ReadThroughCacheConfiguration name(java.lang.String name)
Set the name to set for this cache decorator. May be null.- Parameters:
name- name to use, may be null- Returns:
- this config
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-