public enum ExpectedRevisionConstants extends java.lang.Enum<ExpectedRevisionConstants> implements com.google.protobuf.ProtocolMessageEnum
Constants for expected revision validation in optimistic concurrency control. These can be used in the expected_revision field, or you can specify an actual revision number.Protobuf enum
kurrentdb.protocol.v2.streams.ExpectedRevisionConstants| Enum Constant and Description |
|---|
EXPECTED_REVISION_CONSTANTS_ANY
Accept any current state of the stream (no optimistic concurrency check).
|
EXPECTED_REVISION_CONSTANTS_EXISTS
The stream must exist (have at least one record).
|
EXPECTED_REVISION_CONSTANTS_NO_STREAM
The stream must not exist yet (first write to the stream).
|
EXPECTED_REVISION_CONSTANTS_SINGLE_EVENT
The stream must have exactly one event at revision 0.
|
UNRECOGNIZED |
| Modifier and Type | Field and Description |
|---|---|
static int |
EXPECTED_REVISION_CONSTANTS_ANY_VALUE
Accept any current state of the stream (no optimistic concurrency check).
|
static int |
EXPECTED_REVISION_CONSTANTS_EXISTS_VALUE
The stream must exist (have at least one record).
|
static int |
EXPECTED_REVISION_CONSTANTS_NO_STREAM_VALUE
The stream must not exist yet (first write to the stream).
|
static int |
EXPECTED_REVISION_CONSTANTS_SINGLE_EVENT_VALUE
The stream must have exactly one event at revision 0.
|
| Modifier and Type | Method and Description |
|---|---|
static ExpectedRevisionConstants |
forNumber(int value) |
static com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptor() |
com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
com.google.protobuf.Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static com.google.protobuf.Internal.EnumLiteMap<ExpectedRevisionConstants> |
internalGetValueMap() |
static ExpectedRevisionConstants |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static ExpectedRevisionConstants |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static ExpectedRevisionConstants |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ExpectedRevisionConstants[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ExpectedRevisionConstants EXPECTED_REVISION_CONSTANTS_SINGLE_EVENT
The stream must have exactly one event at revision 0. Used for scenarios requiring strict single-event semantics.
EXPECTED_REVISION_CONSTANTS_SINGLE_EVENT = 0;public static final ExpectedRevisionConstants EXPECTED_REVISION_CONSTANTS_NO_STREAM
The stream must not exist yet (first write to the stream). Fails if the stream already has events.
EXPECTED_REVISION_CONSTANTS_NO_STREAM = -1;public static final ExpectedRevisionConstants EXPECTED_REVISION_CONSTANTS_ANY
Accept any current state of the stream (no optimistic concurrency check). The write will succeed regardless of the stream's current revision.
EXPECTED_REVISION_CONSTANTS_ANY = -2;public static final ExpectedRevisionConstants EXPECTED_REVISION_CONSTANTS_EXISTS
The stream must exist (have at least one record). Fails if the stream doesn't exist yet.
EXPECTED_REVISION_CONSTANTS_EXISTS = -4;public static final ExpectedRevisionConstants UNRECOGNIZED
public static final int EXPECTED_REVISION_CONSTANTS_SINGLE_EVENT_VALUE
The stream must have exactly one event at revision 0. Used for scenarios requiring strict single-event semantics.
EXPECTED_REVISION_CONSTANTS_SINGLE_EVENT = 0;public static final int EXPECTED_REVISION_CONSTANTS_NO_STREAM_VALUE
The stream must not exist yet (first write to the stream). Fails if the stream already has events.
EXPECTED_REVISION_CONSTANTS_NO_STREAM = -1;public static final int EXPECTED_REVISION_CONSTANTS_ANY_VALUE
Accept any current state of the stream (no optimistic concurrency check). The write will succeed regardless of the stream's current revision.
EXPECTED_REVISION_CONSTANTS_ANY = -2;public static final int EXPECTED_REVISION_CONSTANTS_EXISTS_VALUE
The stream must exist (have at least one record). Fails if the stream doesn't exist yet.
EXPECTED_REVISION_CONSTANTS_EXISTS = -4;public static ExpectedRevisionConstants[] values()
for (ExpectedRevisionConstants c : ExpectedRevisionConstants.values()) System.out.println(c);
public static ExpectedRevisionConstants valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic final int getNumber()
getNumber in interface com.google.protobuf.Internal.EnumLitegetNumber in interface com.google.protobuf.ProtocolMessageEnum@Deprecated public static ExpectedRevisionConstants valueOf(int value)
forNumber(int) instead.value - The numeric wire value of the corresponding enum entry.public static ExpectedRevisionConstants forNumber(int value)
value - The numeric wire value of the corresponding enum entry.public static com.google.protobuf.Internal.EnumLiteMap<ExpectedRevisionConstants> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnumpublic final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnumpublic static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static ExpectedRevisionConstants valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)