Enum BacklogQuota.RetentionPolicy
- java.lang.Object
-
- java.lang.Enum<BacklogQuota.RetentionPolicy>
-
- org.apache.pulsar.common.policies.data.BacklogQuota.RetentionPolicy
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<BacklogQuota.RetentionPolicy>
- Enclosing interface:
- BacklogQuota
public static enum BacklogQuota.RetentionPolicy extends java.lang.Enum<BacklogQuota.RetentionPolicy>
Enumeration type determines how to retain backlog against the resource shortages.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description consumer_backlog_evictionPolicy which evicts the oldest message from the slowest consumer's backlog.producer_exceptionPolicy which throws javax.jms.ResourceAllocationException to the producer.producer_request_holdPolicy which holds producer's send request until the resource becomes available (or holding times out).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BacklogQuota.RetentionPolicyvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static BacklogQuota.RetentionPolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
producer_request_hold
public static final BacklogQuota.RetentionPolicy producer_request_hold
Policy which holds producer's send request until the resource becomes available (or holding times out).
-
producer_exception
public static final BacklogQuota.RetentionPolicy producer_exception
Policy which throws javax.jms.ResourceAllocationException to the producer.
-
consumer_backlog_eviction
public static final BacklogQuota.RetentionPolicy consumer_backlog_eviction
Policy which evicts the oldest message from the slowest consumer's backlog.
-
-
Method Detail
-
values
public static BacklogQuota.RetentionPolicy[] 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 (BacklogQuota.RetentionPolicy c : BacklogQuota.RetentionPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BacklogQuota.RetentionPolicy 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
-
-