Class ReadOffset
java.lang.Object
org.springframework.data.redis.connection.stream.ReadOffset
Value object representing read offset for a Stream.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static ReadOffset
Read all arriving elements from the stream starting atoffset
.static ReadOffset
Read all arriving elements from the stream starting atRecordId
.int
hashCode()
static ReadOffset
Read all new arriving elements with ids greater than the last one consumed by the consumer group.static ReadOffset
latest()
Read from the latest offset.toString()
-
Method Details
-
latest
Read from the latest offset.- Returns:
-
lastConsumed
Read all new arriving elements with ids greater than the last one consumed by the consumer group.- Returns:
- the
ReadOffset
object without a specific offset.
-
from
Read all arriving elements from the stream starting atoffset
.- Parameters:
offset
- the stream offset.- Returns:
- the
ReadOffset
starting atoffset
.
-
from
Read all arriving elements from the stream starting atRecordId
. Using aauto-generated
RecordId
returns thelatest()
read offset.- Parameters:
offset
- the stream offset.- Returns:
- the
ReadOffset
starting atRecordId
.
-
getOffset
-
equals
-
hashCode
public int hashCode() -
toString
-