public class EventId extends Object
Constructor and Description |
---|
EventId(ParticipantId participantId,
long sequenceNumber)
Creates a unique Id based on participant and sequence number.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static String |
formatSequenceNumber(long value)
Formats an decimal sequence number as a string with 8 byte width encoding
that number in hex.
|
UUID |
getAsUUID()
|
ParticipantId |
getParticipantId()
Returns the id of the participant that sent the event.
|
long |
getSequenceNumber()
Returns the sequence number which makes this id unique combined with the
sending participants id.
|
int |
hashCode() |
String |
toString() |
public EventId(ParticipantId participantId, long sequenceNumber)
participantId
- the id of the participant causing this eventsequenceNumber
- a number from a sequential list of numbers of events
originating from that participantpublic UUID getAsUUID()
public ParticipantId getParticipantId()
public long getSequenceNumber()
getParticipantId()
public static String formatSequenceNumber(long value)
value
- the number to encodeCopyright © 2018 CoR-Lab. All rights reserved.