Package com.rabbitmq.stream
Class OffsetSpecification
java.lang.Object
com.rabbitmq.stream.OffsetSpecification
API to specify an offset in a stream.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static OffsetSpecification
first()
The first available offset in the stream.long
short
getType()
int
hashCode()
boolean
isOffset()
boolean
static OffsetSpecification
last()
The last chunk of messages in the stream.static OffsetSpecification
next()
The next offset to be written, that is the end of the stream.static OffsetSpecification
none()
When the offset specification is not relevant.static OffsetSpecification
offset
(long offset) A specific offset in the stream.static OffsetSpecification
timestamp
(long timestamp) Offset of messages stored after the specified timestamp.toString()
-
Method Details
-
none
When the offset specification is not relevant.- Returns:
- none offset specification
-
first
The first available offset in the stream.If the stream has not been truncated, this means the beginning of the stream (offset 0).
- Returns:
- first offset in a stream
-
last
The last chunk of messages in the stream.- Returns:
- the offset of the last chunk of messages
-
next
The next offset to be written, that is the end of the stream.- Returns:
- The next offset to be written
-
offset
A specific offset in the stream.The first offset of a non-truncated stream is 0.
- Parameters:
offset
-- Returns:
- the absolute offset
-
timestamp
Offset of messages stored after the specified timestamp.Be aware consumers can receive messages published a bit before the specified timestamp.
- Parameters:
timestamp
-- Returns:
- messages stored after the specified timestamp
-
isOffset
public boolean isOffset() -
isTimestamp
public boolean isTimestamp() -
getType
public short getType() -
getOffset
public long getOffset() -
toString
-
equals
-
hashCode
public int hashCode()
-