Package com.eventstore.dbclient
Class ReadMessage
java.lang.Object
com.eventstore.dbclient.ReadMessage
Received when performing a regular read operation (not a subscription).
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReadMessagefromEvent(ResolvedEvent event) static ReadMessagefromFirstStreamPosition(long position) static ReadMessagefromLastAllPosition(long commit, long prepare) static ReadMessagefromLastStreamPosition(long position) getEvent()Returns a resolved event if defined.longReturns the first stream position if defined.Returns the last $all position if defined.longReturns the last stream position if defined.booleanhasEvent()If this messages holds a resolved event.booleanIf this messages holds the first stream position.booleanIf this messages holds the last $all position.booleanIf this messages holds the last stream position.
-
Method Details
-
fromEvent
-
fromFirstStreamPosition
-
fromLastStreamPosition
-
fromLastAllPosition
-
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
Returns the last $all position if defined.- Returns:
- null is not defined.
-
getEvent
Returns a resolved event if defined.- Returns:
- null is not defined.
-