Class ReadMessage

java.lang.Object
com.eventstore.dbclient.ReadMessage

public final class ReadMessage extends Object
Received when performing a regular read operation (not a subscription).
  • Method Details

    • fromEvent

      public static ReadMessage fromEvent(ResolvedEvent event)
    • fromFirstStreamPosition

      public static ReadMessage fromFirstStreamPosition(long position)
    • fromLastStreamPosition

      public static ReadMessage fromLastStreamPosition(long position)
    • fromLastAllPosition

      public static ReadMessage fromLastAllPosition(long commit, long prepare)
    • hasFirstStreamPosition

      public boolean hasFirstStreamPosition()
      If this messages holds the first stream position.
    • hasLastStreamPosition

      public boolean hasLastStreamPosition()
      If this messages holds the last stream position.
    • hasLastAllPosition

      public boolean hasLastAllPosition()
      If this messages holds the last $all position.
    • hasEvent

      public boolean hasEvent()
      If this messages holds a resolved event.
    • getFirstStreamPosition

      public long getFirstStreamPosition()
      Returns the first stream position if defined.
      Throws:
      NullPointerException - if not defined.
    • getLastStreamPosition

      public long getLastStreamPosition()
      Returns the last stream position if defined.
      Throws:
      NullPointerException - if not defined.
    • getLastAllPosition

      public Position getLastAllPosition()
      Returns the last $all position if defined.
      Returns:
      null is not defined.
    • getEvent

      public ResolvedEvent getEvent()
      Returns a resolved event if defined.
      Returns:
      null is not defined.