public class StreamReadOptions extends Object
2.2
Modifier and Type | Method and Description |
---|---|
StreamReadOptions |
autoAcknowledge()
Enable auto-acknowledgement by setting the
NOACK flag when reading in the context of a consumer group. |
StreamReadOptions |
block(Duration timeout)
Use a blocking read and supply the
timeout after which the call will terminate if no message was
read. |
StreamReadOptions |
count(long count)
Limit the number of messages returned per stream.
|
static StreamReadOptions |
empty()
Creates an empty
StreamReadOptions instance. |
boolean |
equals(Object o) |
Long |
getBlock() |
Long |
getCount() |
int |
hashCode() |
boolean |
isBlocking() |
boolean |
isNoack() |
StreamReadOptions |
noack()
Enable auto-acknowledgement by setting the
NOACK flag when reading in the context of a consumer group. |
String |
toString() |
public static StreamReadOptions empty()
StreamReadOptions
instance.StreamReadOptions
instance.public StreamReadOptions noack()
NOACK
flag when reading in the context of a consumer group. This
method is an alias for autoAcknowledge()
for readability reasons.StreamReadOptions
with noack
applied.public StreamReadOptions autoAcknowledge()
NOACK
flag when reading in the context of a consumer group. This
method is an alias for noack()
for readability reasons.StreamReadOptions
with noack
applied.public StreamReadOptions block(Duration timeout)
timeout
after which the call will terminate if no message was
read.timeout
- the timeout for the blocking read, must not be null or negative.StreamReadOptions
with block
applied.public StreamReadOptions count(long count)
count
- the maximum number of messages to read.StreamReadOptions
with count
applied.public boolean isBlocking()
public boolean isNoack()
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.