Class TimestampOffset

  • public final class TimestampOffset
    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.

    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

    param: timestamp time when the event was stored, microsecond granularity database timestamp param: readTimestamp time when the event was read, microsecond granularity database timestamp param: seen List of sequence nrs for every persistence id seen at this timestamp

    • Constructor Detail

      • TimestampOffset

        public TimestampOffset()
    • Method Detail

      • apply

        public static TimestampOffset apply​(java.time.Instant timestamp,
                                            scala.collection.immutable.Map<java.lang.String,​java.lang.Object> seen)
      • apply

        public static TimestampOffset apply​(java.time.Instant timestamp,
                                            java.time.Instant readTimestamp,
                                            scala.collection.immutable.Map<java.lang.String,​java.lang.Object> seen)
      • toTimestampOffset

        public static TimestampOffset toTimestampOffset​(Offset offset)
        Try to convert the Offset to a TimestampOffset. Epoch timestamp is used for NoOffset.
      • unapply

        public static scala.Option<scala.Tuple3<java.time.Instant,​java.time.Instant,​scala.collection.immutable.Map<java.lang.String,​java.lang.Object>>> unapply​(TimestampOffset timestampOffset)
      • timestamp

        public java.time.Instant timestamp()
      • readTimestamp

        public java.time.Instant readTimestamp()
      • seen

        public scala.collection.immutable.Map<java.lang.String,​java.lang.Object> seen()
      • getSeen

        public java.util.Map<java.lang.String,​java.lang.Long> getSeen()
        Java API
      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object