public static enum Database.ConcurrencyMode extends Enum<Database.ConcurrencyMode> implements com.google.protobuf.ProtocolMessageEnum
The type of concurrency control mode for transactions.Protobuf enum
google.firestore.admin.v1.Database.ConcurrencyMode
Enum Constant and Description |
---|
CONCURRENCY_MODE_UNSPECIFIED
Not used.
|
OPTIMISTIC
Use optimistic concurrency control by default.
|
OPTIMISTIC_WITH_ENTITY_GROUPS
Use optimistic concurrency control with entity groups by default.
|
PESSIMISTIC
Use pessimistic concurrency control by default.
|
UNRECOGNIZED |
Modifier and Type | Field and Description |
---|---|
static int |
CONCURRENCY_MODE_UNSPECIFIED_VALUE
Not used.
|
static int |
OPTIMISTIC_VALUE
Use optimistic concurrency control by default.
|
static int |
OPTIMISTIC_WITH_ENTITY_GROUPS_VALUE
Use optimistic concurrency control with entity groups by default.
|
static int |
PESSIMISTIC_VALUE
Use pessimistic concurrency control by default.
|
Modifier and Type | Method and Description |
---|---|
static Database.ConcurrencyMode |
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<Database.ConcurrencyMode> |
internalGetValueMap() |
static Database.ConcurrencyMode |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static Database.ConcurrencyMode |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static Database.ConcurrencyMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Database.ConcurrencyMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Database.ConcurrencyMode CONCURRENCY_MODE_UNSPECIFIED
Not used.
CONCURRENCY_MODE_UNSPECIFIED = 0;
public static final Database.ConcurrencyMode OPTIMISTIC
Use optimistic concurrency control by default. This mode is available for Cloud Firestore databases.
OPTIMISTIC = 1;
public static final Database.ConcurrencyMode PESSIMISTIC
Use pessimistic concurrency control by default. This mode is available for Cloud Firestore databases. This is the default setting for Cloud Firestore.
PESSIMISTIC = 2;
public static final Database.ConcurrencyMode OPTIMISTIC_WITH_ENTITY_GROUPS
Use optimistic concurrency control with entity groups by default. This is the only available mode for Cloud Datastore. This mode is also available for Cloud Firestore with Datastore Mode but is not recommended.
OPTIMISTIC_WITH_ENTITY_GROUPS = 3;
public static final Database.ConcurrencyMode UNRECOGNIZED
public static final int CONCURRENCY_MODE_UNSPECIFIED_VALUE
Not used.
CONCURRENCY_MODE_UNSPECIFIED = 0;
public static final int OPTIMISTIC_VALUE
Use optimistic concurrency control by default. This mode is available for Cloud Firestore databases.
OPTIMISTIC = 1;
public static final int PESSIMISTIC_VALUE
Use pessimistic concurrency control by default. This mode is available for Cloud Firestore databases. This is the default setting for Cloud Firestore.
PESSIMISTIC = 2;
public static final int OPTIMISTIC_WITH_ENTITY_GROUPS_VALUE
Use optimistic concurrency control with entity groups by default. This is the only available mode for Cloud Datastore. This mode is also available for Cloud Firestore with Datastore Mode but is not recommended.
OPTIMISTIC_WITH_ENTITY_GROUPS = 3;
public static Database.ConcurrencyMode[] values()
for (Database.ConcurrencyMode c : Database.ConcurrencyMode.values()) System.out.println(c);
public static Database.ConcurrencyMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic final int getNumber()
getNumber
in interface com.google.protobuf.Internal.EnumLite
getNumber
in interface com.google.protobuf.ProtocolMessageEnum
@Deprecated public static Database.ConcurrencyMode valueOf(int value)
forNumber(int)
instead.value
- The numeric wire value of the corresponding enum entry.public static Database.ConcurrencyMode forNumber(int value)
value
- The numeric wire value of the corresponding enum entry.public static com.google.protobuf.Internal.EnumLiteMap<Database.ConcurrencyMode> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor
in interface com.google.protobuf.ProtocolMessageEnum
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.ProtocolMessageEnum
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static Database.ConcurrencyMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2023 Google LLC. All rights reserved.