Package net.sf.ehcache.config
Enum TimeoutBehaviorConfiguration.TimeoutBehaviorType
- java.lang.Object
-
- java.lang.Enum<TimeoutBehaviorConfiguration.TimeoutBehaviorType>
-
- net.sf.ehcache.config.TimeoutBehaviorConfiguration.TimeoutBehaviorType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<TimeoutBehaviorConfiguration.TimeoutBehaviorType>
- Enclosing class:
- TimeoutBehaviorConfiguration
public static enum TimeoutBehaviorConfiguration.TimeoutBehaviorType extends java.lang.Enum<TimeoutBehaviorConfiguration.TimeoutBehaviorType>
Enum encapsulating type of TimeoutBehavior- Author:
- Abhishek Sanoujam
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CUSTOMTimeout behavior type that uses a custom factory to create the actual timeout behavior on timeout.EXCEPTIONTimeout behavior type that throws exception on timeoutLOCAL_READSTimeout behavior type that returns local values present in the VM or otherwise null on timeoutLOCAL_READS_AND_EXCEPTION_ON_WRITESTimeout behavior type that returns local values present in the VM or otherwise null on timeout for read operations.NOOPTimeout behavior type that returns null and does nothing on timeout
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static TimeoutBehaviorConfiguration.TimeoutBehaviorTypegetTimeoutBehaviorTypeFromName(java.lang.String typeName)Get theTimeoutBehaviorConfiguration.TimeoutBehaviorTypecorresponding to a nameabstract java.lang.StringgetTypeName()Returns a String signifying this typestatic booleanisValidTimeoutBehaviorType(java.lang.String type)Find out if a string is a valid timeoutBehavior type or notstatic TimeoutBehaviorConfiguration.TimeoutBehaviorTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static TimeoutBehaviorConfiguration.TimeoutBehaviorType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EXCEPTION
public static final TimeoutBehaviorConfiguration.TimeoutBehaviorType EXCEPTION
Timeout behavior type that throws exception on timeout
-
NOOP
public static final TimeoutBehaviorConfiguration.TimeoutBehaviorType NOOP
Timeout behavior type that returns null and does nothing on timeout
-
LOCAL_READS
public static final TimeoutBehaviorConfiguration.TimeoutBehaviorType LOCAL_READS
Timeout behavior type that returns local values present in the VM or otherwise null on timeout
-
LOCAL_READS_AND_EXCEPTION_ON_WRITES
public static final TimeoutBehaviorConfiguration.TimeoutBehaviorType LOCAL_READS_AND_EXCEPTION_ON_WRITES
Timeout behavior type that returns local values present in the VM or otherwise null on timeout for read operations. For write operations, it throws an exception on timeout.
-
CUSTOM
public static final TimeoutBehaviorConfiguration.TimeoutBehaviorType CUSTOM
Timeout behavior type that uses a custom factory to create the actual timeout behavior on timeout. The custom factory has to be configured using properties otherwise an exception will be thrown. There must be a property namedTimeoutBehaviorConfiguration.CUSTOM_TYPE_FACTORY_PROPERTY_NAME.
-
-
Method Detail
-
values
public static TimeoutBehaviorConfiguration.TimeoutBehaviorType[] 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 (TimeoutBehaviorConfiguration.TimeoutBehaviorType c : TimeoutBehaviorConfiguration.TimeoutBehaviorType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TimeoutBehaviorConfiguration.TimeoutBehaviorType 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
-
getTypeName
public abstract java.lang.String getTypeName()
Returns a String signifying this type- Returns:
- the string name for this type
-
isValidTimeoutBehaviorType
public static boolean isValidTimeoutBehaviorType(java.lang.String type)
Find out if a string is a valid timeoutBehavior type or not- Parameters:
type- the string name- Returns:
- true if its valid, otherwise false
-
getTimeoutBehaviorTypeFromName
public static TimeoutBehaviorConfiguration.TimeoutBehaviorType getTimeoutBehaviorTypeFromName(java.lang.String typeName)
Get theTimeoutBehaviorConfiguration.TimeoutBehaviorTypecorresponding to a name- Parameters:
typeName- the type name- Returns:
- the
TimeoutBehaviorConfiguration.TimeoutBehaviorType
-
-