org.apache.pekko.persistence.query

Members list

Type members

Classlikes

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class DeletedDurableState[A](val persistenceId: String, val revision: Long, val offset: Offset, val timestamp: Long) extends DurableStateChange[A]

Type parameters

A

the type of the value

Value parameters

offset

The offset that can be used in next changes or currentChanges query.

persistenceId

The persistence id of the origin entity.

revision

The revision number from the origin entity.

timestamp

The time the state was stored, in milliseconds since midnight, January 1, 1970 UTC (same as System.currentTimeMillis).

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

The DurableStateStoreQuery stream elements for DurableStateStoreQuery.

The DurableStateStoreQuery stream elements for DurableStateStoreQuery.

The implementation can be a UpdatedDurableState or a DeletedDurableState.

Not for user extension

Type parameters

A

the type of the value

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
class
Supertypes
trait (Offset, String, Long, Any) => EventEnvelope
class Object
trait Matchable
class Any
Self type
final class EventEnvelope(val offset: Offset, val persistenceId: String, val sequenceNr: Long, val event: Any, val timestamp: Long, val eventMetadata: Option[Any]) extends Product4[Offset, String, Long, Any], Serializable

Event wrapper adding meta data for the events in the result stream of pekko.persistence.query.scaladsl.EventsByTagQuery query, or similar queries.

Event wrapper adding meta data for the events in the result stream of pekko.persistence.query.scaladsl.EventsByTagQuery query, or similar queries.

The timestamp is the time the event was stored, in milliseconds since midnight, January 1, 1970 UTC (same as System.currentTimeMillis).

Attributes

Companion
object
Supertypes
trait Serializable
trait Product4[Offset, String, Long, Any]
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object NoOffset extends Offset

Used when retrieving all events.

Used when retrieving all events.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Offset
class Object
trait Matchable
class Any
Show all
Self type
NoOffset.type
object Offset

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Offset.type
abstract class Offset

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object NoOffset.type
class Sequence

Persistence extension for queries.

Persistence extension for queries.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
object
Supertypes
trait Extension
class Object
trait Matchable
class Any

A query plugin must implement a class that implements this trait. It provides the concrete implementations for the Java and Scala APIs.

A query plugin must implement a class that implements this trait. It provides the concrete implementations for the Java and Scala APIs.

A read journal plugin must provide implementations for both org.apache.pekko.persistence.query.scaladsl.ReadJournal and org.apache.pekko.persistence.query.javadsl.ReadJournal. The plugin must implement both the scaladsl and the javadsl traits because the org.apache.pekko.stream.scaladsl.Source and org.apache.pekko.stream.javadsl.Source are different types and even though those types can easily be converted to each other it is most convenient for the end user to get access to the Java or Scala Source directly. One of the implementations can delegate to the other.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
final case class Sequence(value: Long) extends Offset, Ordered[Sequence]

Corresponds to an ordered sequence number for the events. Note that the corresponding offset of each event is provided in the pekko.persistence.query.EventEnvelope, which makes it possible to resume the stream at a later point from a given offset.

Corresponds to an ordered sequence number for the events. Note that the corresponding offset of each event is provided in the pekko.persistence.query.EventEnvelope, which makes it possible to resume the stream at a later point from a given offset.

The offset is exclusive, i.e. the event with the exact same sequence number will not be included in the returned stream. This means that you can use the offset that is returned in EventEnvelope as the offset parameter in a subsequent query.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Ordered[Sequence]
trait Comparable[Sequence]
class Offset
class Object
trait Matchable
class Any
Show all
final case class TimeBasedUUID(value: UUID) extends Offset, Ordered[TimeBasedUUID]

Corresponds to an ordered unique identifier of the events. Note that the corresponding offset of each event is provided in the pekko.persistence.query.EventEnvelope, which makes it possible to resume the stream at a later point from a given offset.

Corresponds to an ordered unique identifier of the events. Note that the corresponding offset of each event is provided in the pekko.persistence.query.EventEnvelope, which makes it possible to resume the stream at a later point from a given offset.

The offset is exclusive, i.e. the event with the exact same sequence number will not be included in the returned stream. This means that you can use the offset that is returned in EventEnvelope as the offset parameter in a subsequent query.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Comparable[TimeBasedUUID]
class Offset
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class TimestampOffset(timestamp: Instant, readTimestamp: Instant, seen: Map[String, Long]) extends Offset

Timestamp based offset. Since there can be several events for the same timestamp it keeps track of what sequence nrs for every persistence id that have been seen at this specific timestamp.

Timestamp based offset. Since there can be several events for the same timestamp it keeps track of what sequence nrs for every persistence id that have been seen at this specific timestamp.

The offset is exclusive, i.e. the event with the exact same sequence number will not be included in the returned stream. This means that you can use the offset that is returned in EventEnvelope as the offset parameter in a subsequent query.

API May Change

Value parameters

readTimestamp

time when the event was read, microsecond granularity database timestamp

seen

List of sequence nrs for every persistence id seen at this timestamp

timestamp

time when the event was stored, microsecond granularity database timestamp

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Offset
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class UpdatedDurableState[A](val persistenceId: String, val revision: Long, val value: A, val offset: Offset, val timestamp: Long) extends DurableStateChange[A]

Type parameters

A

the type of the value

Value parameters

offset

The offset that can be used in next changes or currentChanges query.

persistenceId

The persistence id of the origin entity.

revision

The revision number from the origin entity.

timestamp

The time the state was stored, in milliseconds since midnight, January 1, 1970 UTC (same as System.currentTimeMillis).

value

The object value.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any