Package net.sf.ehcache.config
Enum CacheWriterConfiguration.WriteMode
- java.lang.Object
-
- java.lang.Enum<CacheWriterConfiguration.WriteMode>
-
- net.sf.ehcache.config.CacheWriterConfiguration.WriteMode
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<CacheWriterConfiguration.WriteMode>
- Enclosing class:
- CacheWriterConfiguration
public static enum CacheWriterConfiguration.WriteMode extends java.lang.Enum<CacheWriterConfiguration.WriteMode>
Represents how elements are written to theCacheWriter
-
-
Enum Constant Summary
Enum Constants Enum Constant Description WRITE_BEHINDWrite mode enum constant that can be used to configure a cache writer to use write behindWRITE_THROUGHWrite mode enum constant that can be used to configure a cache writer to use write through
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CacheWriterManagercreateWriterManager(Cache cache, Store store)Create a newWriterManagerfor a particular cache instancestatic CacheWriterConfiguration.WriteModevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static CacheWriterConfiguration.WriteMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
WRITE_THROUGH
public static final CacheWriterConfiguration.WriteMode WRITE_THROUGH
Write mode enum constant that can be used to configure a cache writer to use write through
-
WRITE_BEHIND
public static final CacheWriterConfiguration.WriteMode WRITE_BEHIND
Write mode enum constant that can be used to configure a cache writer to use write behind
-
-
Method Detail
-
values
public static CacheWriterConfiguration.WriteMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CacheWriterConfiguration.WriteMode c : CacheWriterConfiguration.WriteMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CacheWriterConfiguration.WriteMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
createWriterManager
public abstract CacheWriterManager createWriterManager(Cache cache, Store store)
Create a newWriterManagerfor a particular cache instance- Parameters:
cache- the cache instance for which theWriterManagershould be created- Returns:
- the newly created
WriterManager
-
-