org.jtoolkit.essence.data
Enum Store.PersistMode

java.lang.Object
  extended by java.lang.Enum<Store.PersistMode>
      extended by org.jtoolkit.essence.data.Store.PersistMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Store.PersistMode>
Enclosing interface:
Store<K,V>

public static enum Store.PersistMode
extends java.lang.Enum<Store.PersistMode>

How is the data persisted.


Enum Constant Summary
ANY
          A default mode for the store is chosen.
ASYNC
          Data is persisted in large batches.
NONE
          Data can be modified in memory but is not persisted.
READ_ONLY
          Data cannot be updates and throws an IllegalStateException if an attempt is made.
SEMI_SYNC
          Data is persisted by a background thread as quickly as is efficient.
SYNC
          Data is always persisted before the operation returns.
 
Method Summary
static Store.PersistMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Store.PersistMode[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ANY

public static final Store.PersistMode ANY
A default mode for the store is chosen. All Stores support this mode.


NONE

public static final Store.PersistMode NONE
Data can be modified in memory but is not persisted.


ASYNC

public static final Store.PersistMode ASYNC
Data is persisted in large batches. This is typically done witha 500-5000 ms delay.


SEMI_SYNC

public static final Store.PersistMode SEMI_SYNC
Data is persisted by a background thread as quickly as is efficient. Typically 25 - 250 ms.


SYNC

public static final Store.PersistMode SYNC
Data is always persisted before the operation returns.


READ_ONLY

public static final Store.PersistMode READ_ONLY
Data cannot be updates and throws an IllegalStateException if an attempt is made.

Method Detail

values

public static final Store.PersistMode[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Store.PersistMode c : Store.PersistMode.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Store.PersistMode 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 name


Copyright © Peter Lawrey. All Rights Reserved.