public class ConsumerConfiguration extends java.lang.Object implements JsonSerializable
Modifier and Type | Class and Description |
---|---|
static class |
ConsumerConfiguration.Builder
ConsumerConfiguration is created using a Builder.
|
Modifier and Type | Field and Description |
---|---|
protected AckPolicy |
ackPolicy |
protected java.time.Duration |
ackWait |
protected java.util.List<java.time.Duration> |
backoff |
static AckPolicy |
DEFAULT_ACK_POLICY |
static DeliverPolicy |
DEFAULT_DELIVER_POLICY |
static ReplayPolicy |
DEFAULT_REPLAY_POLICY |
protected java.lang.String |
deliverGroup |
protected DeliverPolicy |
deliverPolicy |
protected java.lang.String |
deliverSubject |
protected java.lang.String |
description |
protected java.lang.String |
durable |
static java.time.Duration |
DURATION_MIN
Deprecated.
|
static long |
DURATION_MIN_LONG |
static java.time.Duration |
DURATION_UNSET |
static long |
DURATION_UNSET_LONG |
protected java.util.List<java.lang.String> |
filterSubjects |
protected java.lang.Boolean |
flowControl |
protected java.lang.Boolean |
headersOnly |
protected java.time.Duration |
idleHeartbeat |
protected java.time.Duration |
inactiveThreshold |
static int |
INTEGER_UNSET |
static long |
LONG_UNSET |
static int |
MAX_DELIVER_MIN |
protected java.lang.Integer |
maxAckPending |
protected java.lang.Integer |
maxBatch |
protected java.lang.Integer |
maxBytes |
protected java.lang.Integer |
maxDeliver |
protected java.time.Duration |
maxExpires |
protected java.lang.Integer |
maxPullWaiting |
protected java.lang.Boolean |
memStorage |
protected java.util.Map<java.lang.String,java.lang.String> |
metadata |
static java.time.Duration |
MIN_IDLE_HEARTBEAT |
static long |
MIN_IDLE_HEARTBEAT_MILLIS |
static long |
MIN_IDLE_HEARTBEAT_NANOS |
protected java.lang.String |
name |
protected java.lang.Integer |
numReplicas |
protected java.time.ZonedDateTime |
pauseUntil |
protected java.lang.Long |
rateLimit |
protected ReplayPolicy |
replayPolicy |
protected java.lang.String |
sampleFrequency |
static int |
STANDARD_MIN |
protected java.lang.Long |
startSeq |
protected java.time.ZonedDateTime |
startTime |
static long |
ULONG_UNSET |
Modifier | Constructor and Description |
---|---|
protected |
ConsumerConfiguration(ConsumerConfiguration.Builder b) |
protected |
ConsumerConfiguration(ConsumerConfiguration cc) |
Modifier and Type | Method and Description |
---|---|
boolean |
ackPolicyWasSet()
Gets whether ack policy for this consumer configuration was set or left unset
|
boolean |
backoffWasSet()
Gets whether backoff for this consumer configuration was set or left unset
|
static ConsumerConfiguration.Builder |
builder()
Creates a builder for the options.
|
static ConsumerConfiguration.Builder |
builder(ConsumerConfiguration cc)
Creates a builder for the options.
|
boolean |
deliverPolicyWasSet()
Gets whether deliver policy of this consumer configuration was set or left unset
|
boolean |
flowControlWasSet()
Gets whether flow control for this consumer configuration was set or left unset
|
AckPolicy |
getAckPolicy()
Gets the acknowledgment policy of this consumer configuration.
|
java.time.Duration |
getAckWait()
Gets the acknowledgment wait of this consumer configuration.
|
java.util.List<java.time.Duration> |
getBackoff()
Get the backoff list; may be empty, will never be null.
|
java.lang.String |
getDeliverGroup()
Gets the deliver group of this consumer configuration.
|
DeliverPolicy |
getDeliverPolicy()
Gets the deliver policy of this consumer configuration.
|
java.lang.String |
getDeliverSubject()
Gets the deliver subject of this consumer configuration.
|
java.lang.String |
getDescription()
Gets the name of the description of this consumer configuration.
|
java.lang.String |
getDurable()
Gets the name of the durable name for this consumer configuration.
|
java.lang.String |
getFilterSubject()
Gets the filter subject of this consumer configuration.
|
java.util.List<java.lang.String> |
getFilterSubjects()
Gets the filter subjects as a list.
|
java.time.Duration |
getIdleHeartbeat()
Gets the idle heart beat wait time
|
java.time.Duration |
getInactiveThreshold()
Get the amount of time before the consumer is deemed inactive.
|
long |
getMaxAckPending()
Gets the maximum ack pending configuration.
|
long |
getMaxBatch()
Get the max batch size for the server to allow on pull requests.
|
long |
getMaxBytes()
Get the max bytes size for the server to allow on pull requests.
|
long |
getMaxDeliver()
Gets the max delivery amount of this consumer configuration.
|
java.time.Duration |
getMaxExpires()
Get the max amount of expire time for the server to allow on pull requests.
|
long |
getMaxPullWaiting()
Get the number of pulls that can be outstanding on a pull consumer
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Metadata for the consumer; may be empty, will never be null.
|
java.lang.String |
getName()
Gets the name of the consumer name for this consumer configuration.
|
int |
getNumReplicas()
Get the number of consumer replicas.
|
protected static AckPolicy |
GetOrDefault(AckPolicy p) |
protected static DeliverPolicy |
GetOrDefault(DeliverPolicy p) |
protected static ReplayPolicy |
GetOrDefault(ReplayPolicy p) |
protected static java.time.Duration |
getOrUnset(java.time.Duration val) |
protected static int |
getOrUnset(java.lang.Integer val) |
protected static long |
getOrUnsetUlong(java.lang.Long val) |
java.time.ZonedDateTime |
getPauseUntil()
Get the time until the consumer is paused.
|
long |
getRateLimit()
Gets the rate limit for this consumer configuration.
|
ReplayPolicy |
getReplayPolicy()
Gets the replay policy of this consumer configuration.
|
java.lang.String |
getSampleFrequency()
Gets the sample frequency.
|
long |
getStartSequence()
Gets the start sequence of this consumer configuration.
|
java.time.ZonedDateTime |
getStartTime()
Gets the start time of this consumer configuration.
|
boolean |
hasMultipleFilterSubjects()
Whether there are multiple filter subjects for this consumer configuration.
|
boolean |
headersOnlyWasSet()
Gets whether headers only for this consumer configuration was set or left unset
|
boolean |
isFlowControl()
Get the flow control flag indicating whether it's on or off
|
boolean |
isHeadersOnly()
Get the header only flag indicating whether it's on or off
|
boolean |
isMemStorage()
Get the mem storage flag whether it's on or off.
|
boolean |
maxAckPendingWasSet()
Gets whether max ack pending for this consumer configuration was set or left unset
|
boolean |
maxBatchWasSet()
Gets whether max batch for this consumer configuration was set or left unset
|
boolean |
maxBytesWasSet()
Gets whether max bytes for this consumer configuration was set or left unset
|
boolean |
maxDeliverWasSet()
Gets whether max deliver for this consumer configuration was set or left unset
|
boolean |
maxPullWaitingWasSet()
Gets whether max pull waiting for this consumer configuration was set or left unset
|
boolean |
memStorageWasSet()
Gets whether mem storage for this consumer configuration was set or left unset
|
boolean |
metadataWasSet()
Gets whether metadata for this consumer configuration was set or left unset
|
protected static java.time.Duration |
normalize(java.time.Duration d) |
protected static java.lang.Integer |
normalize(java.lang.Long l,
int min) |
protected static java.time.Duration |
normalizeDuration(long millis) |
protected static java.lang.Long |
normalizeUlong(java.lang.Long u) |
boolean |
numReplicasWasSet()
Gets whether num replicas for this consumer configuration was set or left unset
|
boolean |
rateLimitWasSet()
Gets whether rate limit for this consumer configuration was set or left unset
|
boolean |
replayPolicyWasSet()
Gets whether replay policy for this consumer configuration was set or left unset
|
boolean |
startSeqWasSet()
Gets whether start sequence for this consumer configuration was set or left unset
|
java.lang.String |
toJson()
Returns a JSON representation of this consumer configuration.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
serialize, toJsonValue
@Deprecated public static final java.time.Duration DURATION_MIN
public static final DeliverPolicy DEFAULT_DELIVER_POLICY
public static final AckPolicy DEFAULT_ACK_POLICY
public static final ReplayPolicy DEFAULT_REPLAY_POLICY
public static final java.time.Duration DURATION_UNSET
public static final java.time.Duration MIN_IDLE_HEARTBEAT
public static final int INTEGER_UNSET
public static final long LONG_UNSET
public static final long ULONG_UNSET
public static final long DURATION_UNSET_LONG
public static final long DURATION_MIN_LONG
public static final int STANDARD_MIN
public static final int MAX_DELIVER_MIN
public static final long MIN_IDLE_HEARTBEAT_NANOS
public static final long MIN_IDLE_HEARTBEAT_MILLIS
protected final DeliverPolicy deliverPolicy
protected final AckPolicy ackPolicy
protected final ReplayPolicy replayPolicy
protected final java.lang.String description
protected final java.lang.String durable
protected final java.lang.String name
protected final java.lang.String deliverSubject
protected final java.lang.String deliverGroup
protected final java.lang.String sampleFrequency
protected final java.time.ZonedDateTime startTime
protected final java.time.Duration ackWait
protected final java.time.Duration idleHeartbeat
protected final java.time.Duration maxExpires
protected final java.time.Duration inactiveThreshold
protected final java.lang.Long startSeq
protected final java.lang.Integer maxDeliver
protected final java.lang.Long rateLimit
protected final java.lang.Integer maxAckPending
protected final java.lang.Integer maxPullWaiting
protected final java.lang.Integer maxBatch
protected final java.lang.Integer maxBytes
protected final java.lang.Integer numReplicas
protected final java.time.ZonedDateTime pauseUntil
protected final java.lang.Boolean flowControl
protected final java.lang.Boolean headersOnly
protected final java.lang.Boolean memStorage
protected final java.util.List<java.time.Duration> backoff
protected final java.util.Map<java.lang.String,java.lang.String> metadata
protected final java.util.List<java.lang.String> filterSubjects
protected ConsumerConfiguration(ConsumerConfiguration cc)
protected ConsumerConfiguration(ConsumerConfiguration.Builder b)
public java.lang.String toJson()
toJson
in interface JsonSerializable
public java.lang.String getDescription()
public java.lang.String getDurable()
public java.lang.String getName()
public java.lang.String getDeliverSubject()
public java.lang.String getDeliverGroup()
public DeliverPolicy getDeliverPolicy()
public long getStartSequence()
public java.time.ZonedDateTime getStartTime()
public AckPolicy getAckPolicy()
public java.time.Duration getAckWait()
public long getMaxDeliver()
public java.lang.String getFilterSubject()
public java.util.List<java.lang.String> getFilterSubjects()
public boolean hasMultipleFilterSubjects()
public ReplayPolicy getReplayPolicy()
public long getRateLimit()
public long getMaxAckPending()
public java.lang.String getSampleFrequency()
public java.time.Duration getIdleHeartbeat()
public boolean isFlowControl()
public long getMaxPullWaiting()
public boolean isHeadersOnly()
public boolean isMemStorage()
public long getMaxBatch()
public long getMaxBytes()
public java.time.Duration getMaxExpires()
public java.time.Duration getInactiveThreshold()
public java.util.List<java.time.Duration> getBackoff()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
public int getNumReplicas()
public java.time.ZonedDateTime getPauseUntil()
public boolean deliverPolicyWasSet()
public boolean ackPolicyWasSet()
public boolean replayPolicyWasSet()
public boolean startSeqWasSet()
public boolean maxDeliverWasSet()
public boolean rateLimitWasSet()
public boolean maxAckPendingWasSet()
public boolean maxPullWaitingWasSet()
public boolean maxBatchWasSet()
public boolean maxBytesWasSet()
public boolean flowControlWasSet()
public boolean headersOnlyWasSet()
public boolean memStorageWasSet()
public boolean numReplicasWasSet()
public boolean backoffWasSet()
public boolean metadataWasSet()
public static ConsumerConfiguration.Builder builder()
public static ConsumerConfiguration.Builder builder(ConsumerConfiguration cc)
cc
- the consumer configurationpublic java.lang.String toString()
toString
in class java.lang.Object
protected static int getOrUnset(java.lang.Integer val)
protected static long getOrUnsetUlong(java.lang.Long val)
protected static java.time.Duration getOrUnset(java.time.Duration val)
protected static java.lang.Integer normalize(java.lang.Long l, int min)
protected static java.lang.Long normalizeUlong(java.lang.Long u)
protected static java.time.Duration normalize(java.time.Duration d)
protected static java.time.Duration normalizeDuration(long millis)
protected static DeliverPolicy GetOrDefault(DeliverPolicy p)
protected static ReplayPolicy GetOrDefault(ReplayPolicy p)