ehcache

net.sf.ehcache.config
Class PersistenceConfiguration

java.lang.Object
  extended by net.sf.ehcache.config.PersistenceConfiguration

public class PersistenceConfiguration
extends Object

Class to hold the persistence policy configuration.

Author:
Chris Dennis

Nested Class Summary
static class PersistenceConfiguration.Strategy
          Enumeration of the legal persistence strategies
 
Field Summary
static boolean DEFAULT_SYNCHRONOUS_WRITES
          Default synchronous writes setting
 
Constructor Summary
PersistenceConfiguration()
           
 
Method Summary
 PersistenceConfiguration.Strategy getStrategy()
          Gets the persistence strategy
 boolean getSynchronousWrites()
          Gets the persistence write mode
 void setStrategy(String strategy)
          Sets the persistence strategy
 void setSynchronousWrites(boolean synchronousWrites)
          Sets the persistence write mode
 PersistenceConfiguration strategy(PersistenceConfiguration.Strategy strategy)
          Builder method to set the persistence strategy
 PersistenceConfiguration strategy(String strategy)
          Builder method to set the persistence strategy using a String object
 PersistenceConfiguration synchronousWrites(boolean synchronousWrites)
          Builder method to set the persistence write mode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SYNCHRONOUS_WRITES

public static final boolean DEFAULT_SYNCHRONOUS_WRITES
Default synchronous writes setting

See Also:
Constant Field Values
Constructor Detail

PersistenceConfiguration

public PersistenceConfiguration()
Method Detail

getStrategy

public PersistenceConfiguration.Strategy getStrategy()
Gets the persistence strategy

Returns:
the persistence strategy

setStrategy

public void setStrategy(String strategy)
Sets the persistence strategy

Parameters:
strategy - the persistence strategy

strategy

public PersistenceConfiguration strategy(PersistenceConfiguration.Strategy strategy)
Builder method to set the persistence strategy

Parameters:
strategy - the persistence strategy
Returns:
this PersistenceConfiguration object

strategy

public PersistenceConfiguration strategy(String strategy)
Builder method to set the persistence strategy using a String object

Parameters:
strategy - the persistence strategy
Returns:
this PersistenceConfiguration object

getSynchronousWrites

public boolean getSynchronousWrites()
Gets the persistence write mode

Returns:
the persistence write mode

setSynchronousWrites

public void setSynchronousWrites(boolean synchronousWrites)
Sets the persistence write mode

Parameters:
synchronousWrites - the persistence write mode

synchronousWrites

public PersistenceConfiguration synchronousWrites(boolean synchronousWrites)
Builder method to set the persistence write mode

Parameters:
synchronousWrites - the persistence write mode
Returns:
this PersistenceConfiguration object

ehcache

Copyright 2001-2014, Terracotta, Inc.