Class StreamPosition<A>

java.lang.Object
com.eventstore.dbclient.StreamPosition<A>
Type Parameters:
A - could be a revision number or transaction log position.

public class StreamPosition<A> extends Object
Represents a logical position in a regular stream or $all stream.
  • Method Details

    • start

      public static <A> StreamPosition<A> start()
      Represents the beginning of a stream.
    • end

      public static <A> StreamPosition<A> end()
      Represents the end of a stream.
    • position

      public static <A> StreamPosition<A> position(A position)
      Represents a specific position.
    • isStart

      public boolean isStart()
      Checks if it's the beginning of the stream.
    • isEnd

      public boolean isEnd()
      Checks if it's the end of the stream.
    • getPosition

      public Optional<A> getPosition()
      Checks it's a specific position and returns the value.
    • getPositionOrThrow

      public A getPositionOrThrow()
      Checks if it's a specific position and returns the value.