Package com.eventstore.dbclient
Class ExpectedRevision
- java.lang.Object
-
- com.eventstore.dbclient.ExpectedRevision
-
public abstract class ExpectedRevision extends java.lang.ObjectConstants used for expected revision control.The EventStoreDB server will assure idempotency for all requests using any value in ExpectedRevision except ANY. When using ANY, the EventStoreDB server will do its best to assure idempotency but will not guarantee it. Any other ExpectedRevision instances are meant for optimistic concurrency checks.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExpectedRevisionany()This writes should not conflict with anything and should always succeed.booleanequals(java.lang.Object o)static ExpectedRevisionexpectedRevision(long revision)States that the last event written to the stream should have an event revision matching your expected value.inthashCode()static ExpectedRevisionnoStream()The stream being written to should not yet exist.static ExpectedRevisionstreamExists()The stream should exist.
-
-
-
Method Detail
-
any
public static ExpectedRevision any()
This writes should not conflict with anything and should always succeed.
-
noStream
public static ExpectedRevision noStream()
The stream being written to should not yet exist. If it does exist, treats that as a concurrency problem.
-
streamExists
public static ExpectedRevision streamExists()
The stream should exist. If it or a metadata stream does not exist, treats that as a concurrency problem.
-
expectedRevision
public static ExpectedRevision expectedRevision(long revision)
States that the last event written to the stream should have an event revision matching your expected value.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-