类 KeySharedPolicy
- java.lang.Object
-
- org.apache.pulsar.client.api.KeySharedPolicy
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static class
KeySharedPolicy.KeySharedPolicyAutoSplit
Auto split hash range key shared policy.static class
KeySharedPolicy.KeySharedPolicySticky
Sticky attach topic with fixed hash range.
-
字段概要
字段 修饰符和类型 字段 说明 protected boolean
allowOutOfOrderDelivery
static int
DEFAULT_HASH_RANGE_SIZE
protected KeySharedMode
keySharedMode
-
构造器概要
构造器 构造器 说明 KeySharedPolicy()
-
方法概要
所有方法 静态方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 static KeySharedPolicy.KeySharedPolicyAutoSplit
autoSplitHashRange()
int
getHashRangeTotal()
KeySharedMode
getKeySharedMode()
boolean
isAllowOutOfOrderDelivery()
KeySharedPolicy
setAllowOutOfOrderDelivery(boolean allowOutOfOrderDelivery)
If enabled, it will relax the ordering requirement, allowing the broker to send out-of-order messages in case of failures.static KeySharedPolicy.KeySharedPolicySticky
stickyHashRange()
abstract void
validate()
-
-
-
字段详细资料
-
keySharedMode
protected KeySharedMode keySharedMode
-
allowOutOfOrderDelivery
protected boolean allowOutOfOrderDelivery
-
DEFAULT_HASH_RANGE_SIZE
public static final int DEFAULT_HASH_RANGE_SIZE
- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
autoSplitHashRange
public static KeySharedPolicy.KeySharedPolicyAutoSplit autoSplitHashRange()
-
stickyHashRange
public static KeySharedPolicy.KeySharedPolicySticky stickyHashRange()
-
validate
public abstract void validate()
-
setAllowOutOfOrderDelivery
public KeySharedPolicy setAllowOutOfOrderDelivery(boolean allowOutOfOrderDelivery)
If enabled, it will relax the ordering requirement, allowing the broker to send out-of-order messages in case of failures. This will make it faster for new consumers to join without being stalled by an existing slow consumer.In this case, a single consumer will still receive all the keys, but they may be coming in different orders.
- 参数:
allowOutOfOrderDelivery
- whether to allow for out of order delivery- 返回:
- KeySharedPolicy instance
-
isAllowOutOfOrderDelivery
public boolean isAllowOutOfOrderDelivery()
-
getKeySharedMode
public KeySharedMode getKeySharedMode()
-
getHashRangeTotal
public int getHashRangeTotal()
-
-