public abstract class Offset extends Object
Offsets are used for ordering of events, typically in event journals, so that consumers can keep track of what events they have and haven't consumed.
Akka persistence, which underlies Lagom's persistence APIs, uses different offset types for
different persistence datastores. This class provides an abstraction over them. The two types
currently supported are a long
sequence number and a time based UUID
.
Modifier and Type | Class and Description |
---|---|
static class |
Offset.NoOffset |
static class |
Offset.Sequence
A sequence number offset, backed by a long.
|
static class |
Offset.TimeBasedUUID
A time-based UUID offset, backed by a UUID.
|
Modifier and Type | Method and Description |
---|---|
static Offset |
sequence(long value)
Create a sequence offset.
|
static Offset |
timeBasedUUID(UUID uuid)
Create a time based UUID offset.
|