public class RecordId extends Object
Record within a stream. Composed of two parts:
<millisecondsTime>-<sequenceNumber>.| Modifier and Type | Method and Description |
|---|---|
static RecordId |
autoGenerate()
Obtain the
RecordId signalling the server to auto generate an entry-id on insert (XADD). |
boolean |
equals(Object o) |
Long |
getSequence()
Get the entry-id sequenceNumber part or null if it
shouldBeAutoGenerated(). |
Long |
getTimestamp()
Get the entry-id millisecondsTime part or null if it
shouldBeAutoGenerated(). |
String |
getValue() |
int |
hashCode() |
static RecordId |
of(long millisecondsTime,
long sequenceNumber)
Create a new instance of
RecordId using the provided String formatted as
<millisecondsTime>-<sequenceNumber>. |
static RecordId |
of(String value)
Obtain an instance of
RecordId using the provided String formatted as
<millisecondsTime>-<sequenceNumber>. |
boolean |
shouldBeAutoGenerated() |
String |
toString() |
public static RecordId of(@Nullable String value)
RecordId using the provided String formatted as
<millisecondsTime>-<sequenceNumber>. autoGenerate().value - can be null.RecordId if no autogenerated one requested.public static RecordId of(long millisecondsTime, long sequenceNumber)
RecordId using the provided String formatted as
<millisecondsTime>-<sequenceNumber>. autoGenerate().millisecondsTime - sequenceNumber - RecordId.public static RecordId autoGenerate()
RecordId signalling the server to auto generate an entry-id on insert (XADD).RecordId instance signalling shouldBeAutoGenerated().@Nullable public Long getTimestamp()
shouldBeAutoGenerated().@Nullable public Long getSequence()
shouldBeAutoGenerated().public boolean shouldBeAutoGenerated()
XADD.public String getValue()
shouldBeAutoGenerated(). Never null.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.