ehcache

net.sf.ehcache.config
Enum CacheWriterConfiguration.WriteMode

java.lang.Object
  extended by java.lang.Enum<CacheWriterConfiguration.WriteMode>
      extended by net.sf.ehcache.config.CacheWriterConfiguration.WriteMode
All Implemented Interfaces:
Serializable, Comparable<CacheWriterConfiguration.WriteMode>
Enclosing class:
CacheWriterConfiguration

public static enum CacheWriterConfiguration.WriteMode
extends Enum<CacheWriterConfiguration.WriteMode>

Represents how elements are written to the CacheWriter


Enum Constant Summary
WRITE_BEHIND
          Write mode enum constant that can be used to configure a cache writer to use write behind
WRITE_THROUGH
          Write mode enum constant that can be used to configure a cache writer to use write through
 
Method Summary
abstract  CacheWriterManager createWriterManager(Cache cache, Store store)
          Create a new WriterManager for a particular cache instance
static CacheWriterConfiguration.WriteMode valueOf(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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

createWriterManager

public abstract CacheWriterManager createWriterManager(Cache cache,
                                                       Store store)
Create a new WriterManager for a particular cache instance

Parameters:
cache - the cache instance for which the WriterManager should be created
Returns:
the newly created WriterManager

ehcache

Copyright 2001-2017, Terracotta, Inc.