@PublicEvolving public static enum StopCursor.StopCondition extends Enum<StopCursor.StopCondition>
Enum Constant and Description |
---|
CONTINUE
This message should be included in the result.
|
EXACTLY
This message should be included in the result and stop consuming.
|
TERMINATE
Stop consuming, the given message wouldn't be included in the result.
|
Modifier and Type | Method and Description |
---|---|
static StopCursor.StopCondition |
compare(long desired,
long current,
boolean inclusive)
Common methods for comparing the message time.
|
static StopCursor.StopCondition |
compare(org.apache.pulsar.client.api.MessageId desired,
org.apache.pulsar.client.api.MessageId current,
boolean inclusive)
Common methods for comparing the message id.
|
static StopCursor.StopCondition |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StopCursor.StopCondition[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StopCursor.StopCondition CONTINUE
public static final StopCursor.StopCondition EXACTLY
public static final StopCursor.StopCondition TERMINATE
public static StopCursor.StopCondition[] values()
for (StopCursor.StopCondition c : StopCursor.StopCondition.values()) System.out.println(c);
public static StopCursor.StopCondition valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static StopCursor.StopCondition compare(org.apache.pulsar.client.api.MessageId desired, org.apache.pulsar.client.api.MessageId current, boolean inclusive)
desired
- The stop goal of the message id.current
- The upcoming message id.inclusive
- Should the desired message be included in the consuming result.public static StopCursor.StopCondition compare(long desired, long current, boolean inclusive)
desired
- The stop goal of the message time.current
- The upcoming message time.inclusive
- Should the desired message be included in the consuming result.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.