Package net.sf.eBus.config
Enum EConfigure.DiscardPolicy
- java.lang.Object
-
- java.lang.Enum<EConfigure.DiscardPolicy>
-
- net.sf.eBus.config.EConfigure.DiscardPolicy
-
- All Implemented Interfaces:
Serializable,Comparable<EConfigure.DiscardPolicy>
- Enclosing class:
- EConfigure
public static enum EConfigure.DiscardPolicy extends Enum<EConfigure.DiscardPolicy>
When a connection is paused and the server message backlog breaches the maximum allowed message backlog limit, this policy specifies which messages should be discarded to keep the backlog at the limit.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description OLDEST_FIRSTDiscard the oldest messages first (FIFO).YOUNGEST_FIRSTDiscard the youngest messages first (LIFO).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EConfigure.DiscardPolicyvalueOf(String name)Returns the enum constant of this type with the specified name.static EConfigure.DiscardPolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OLDEST_FIRST
public static final EConfigure.DiscardPolicy OLDEST_FIRST
Discard the oldest messages first (FIFO).
-
YOUNGEST_FIRST
public static final EConfigure.DiscardPolicy YOUNGEST_FIRST
Discard the youngest messages first (LIFO).
-
-
Method Detail
-
values
public static EConfigure.DiscardPolicy[] 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 (EConfigure.DiscardPolicy c : EConfigure.DiscardPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EConfigure.DiscardPolicy 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 nameNullPointerException- if the argument is null
-
-