@PublicEvolving public class TopicRange extends Object implements Serializable
Range
is a hash scope for pulsar message key. The total hash range size is 65536, so
the end of the range should be 65535, the start the range should be 0.
KeySharedPolicy.KeySharedPolicySticky
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
MAX_RANGE
The end position for hash range, it's 65535.
|
static int |
MIN_RANGE
The start position for hash range.
|
static int |
RANGE_SIZE |
Constructor and Description |
---|
TopicRange(int start,
int end) |
Modifier and Type | Method and Description |
---|---|
static TopicRange |
createFullRange()
Create a topic range which contains the full hash range.
|
boolean |
equals(Object o) |
int |
getEnd() |
int |
getStart() |
int |
hashCode() |
org.apache.pulsar.client.api.Range |
toPulsarRange()
Convert to pulsar's
Range API for consuming in client. |
String |
toString() |
public static final int RANGE_SIZE
public static final int MIN_RANGE
public static final int MAX_RANGE
public org.apache.pulsar.client.api.Range toPulsarRange()
Range
API for consuming in client.public static TopicRange createFullRange()
public int getStart()
public int getEnd()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.