Package com.eventstore.dbclient
Class ExpectedRevision
java.lang.Object
com.eventstore.dbclient.ExpectedRevision
- Direct Known Subclasses:
ExpectedRevision.AnyExpectedRevision,ExpectedRevision.NoStreamExpectedRevision,ExpectedRevision.SpecificExpectedRevision,ExpectedRevision.StreamExistsExpectedRevision
Constants 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionstatic ExpectedRevisionany()This writes should not conflict with anything and should always succeed.booleanstatic ExpectedRevisionexpectedRevision(long revision) States that the last event written to the stream should have an event revision matching your expected value.static ExpectedRevisionfromRawLong(long revision) inthashCode()static ExpectedRevisionnoStream()The stream being written to should not yet exist.static ExpectedRevisionThe stream should exist.long
-
Method Details
-
any
This writes should not conflict with anything and should always succeed. -
noStream
The stream being written to should not yet exist. If it does exist, treats that as a concurrency problem. -
streamExists
The stream should exist. If it or a metadata stream does not exist, treats that as a concurrency problem. -
expectedRevision
States that the last event written to the stream should have an event revision matching your expected value. -
fromRawLong
-
toRawLong
public long toRawLong() -
equals
-
hashCode
public int hashCode()
-