ehcache

net.sf.ehcache.constructs.readthrough
Class ReadThroughCacheConfiguration

java.lang.Object
  extended by net.sf.ehcache.constructs.readthrough.ReadThroughCacheConfiguration
All Implemented Interfaces:
Cloneable

public class ReadThroughCacheConfiguration
extends Object
implements Cloneable

This classed is used to programmatically configure a ReadThroughCache.

Author:
cschanck

Field Summary
static String GET_KEY
          Properties key for the get() proxy attribute
static String NAME_KEY
          Properties key for the name attribute
 
Constructor Summary
ReadThroughCacheConfiguration()
          Create default, valid configuration.
 
Method Summary
 ReadThroughCacheConfiguration build()
          Validate this configuration, mark it valid if it passes.
 ReadThroughCacheConfiguration fromProperties(Properties properties)
          Create a configuration object from a properties object.
 String getName()
          Get the name to set for this cache decorator.
 boolean isModeGet()
          Return whether the get() method is proxied.
 ReadThroughCacheConfiguration modeGet(boolean modeGet)
          Set whether get() methods will be transparently proxied.
 ReadThroughCacheConfiguration name(String name)
          Set the name to set for this cache decorator.
 void setModeGet(boolean modeGet)
          Set whether get() methods will be transparently proxied.
 ReadThroughCacheConfiguration setName(String name)
          Set the name to set for this cache decorator.
 Properties toProperties()
          Return a properties version of this configuration object.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_KEY

public static final String NAME_KEY
Properties key for the name attribute

See Also:
Constant Field Values

GET_KEY

public static final String GET_KEY
Properties key for the get() proxy attribute

See Also:
Constant Field Values
Constructor Detail

ReadThroughCacheConfiguration

public ReadThroughCacheConfiguration()
Create default, valid configuration.

Method Detail

fromProperties

public ReadThroughCacheConfiguration fromProperties(Properties properties)
Create a configuration object from a properties object. Validate before returning.

Parameters:
properties -
Returns:

toProperties

public 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 String getName()
Get the name to set for this cache decorator. May be null.

Returns:
the name

setName

public ReadThroughCacheConfiguration setName(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(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 String toString()
Overrides:
toString in class Object

ehcache

Copyright 2001-2014, Terracotta, Inc.