Enum DeliveryOption
- java.lang.Object
-
- java.lang.Enum<DeliveryOption>
-
- com.alachisoft.ncache.runtime.caching.DeliveryOption
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DeliveryOption>
public enum DeliveryOption extends java.lang.Enum<DeliveryOption>
NCache provides a DeliveryOption enum which specifies how the message should be delivered to any registered subscribers. The delivery option is specified during message publishing phase. It contains the following options:
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DeliveryOption
forValue(int value)
retreives the enum constant of the specified value, if exists.int
getValue()
Order is important in enums.By using getValue() method, each enum constant index can be found, just like array index.static DeliveryOption
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DeliveryOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
All
public static final DeliveryOption All
Delivers message to all registered subscribers, if no subscriber has been registered, it will return without any failure acknowledgment. Message will be sent to any subscriber when it registers on topic; unless message expiration has not occurred.
-
Any
public static final DeliveryOption Any
Delivers message to any one of the registered subscribers. If acknowledgement is not received, the message is reassigned to another subscriber till it reaches its expiration time limit.
-
-
Method Detail
-
values
public static DeliveryOption[] 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 (DeliveryOption c : DeliveryOption.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DeliveryOption 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
-
forValue
public static DeliveryOption forValue(int value)
retreives the enum constant of the specified value, if exists.- Parameters:
value
- enum constant index- Returns:
- enum constant
-
getValue
public int getValue()
Order is important in enums.By using getValue() method, each enum constant index can be found, just like array index.- Returns:
- enum constant index
-
-