Package com.eventstore.dbclient
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 java.lang.ObjectRepresents a logical position in a regular stream or $all stream.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <A> StreamPosition<A>end()Represents the end of a stream.java.util.Optional<A>getPosition()Checks it's a specific position and returns the value.AgetPositionOrThrow()Checks it it's a specific position and returns the value.booleanisEnd()Checks if it's the end of the stream.booleanisStart()Checks if it's the beginning of the stream.static <A> StreamPosition<A>position(A position)Represents a specific position.static <A> StreamPosition<A>start()Represents the beginning of a stream.
-
-
-
Method Detail
-
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 java.util.Optional<A> getPosition()
Checks it's a specific position and returns the value.
-
getPositionOrThrow
public A getPositionOrThrow()
Checks it it's a specific position and returns the value.
-
-