public static enum ReplicaInfo.ReplicaType extends Enum<ReplicaInfo.ReplicaType> implements com.google.protobuf.ProtocolMessageEnum
Indicates the type of replica. See the [replica types documentation](https://cloud.google.com/spanner/docs/replication#replica_types) for more details.Protobuf enum
google.spanner.admin.instance.v1.ReplicaInfo.ReplicaType| Enum Constant and Description |
|---|
READ_ONLY
Read-only replicas only support reads (not writes).
|
READ_WRITE
Read-write replicas support both reads and writes.
|
TYPE_UNSPECIFIED
Not specified.
|
UNRECOGNIZED |
WITNESS
Witness replicas don't support reads but do participate in voting to
commit writes.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
READ_ONLY_VALUE
Read-only replicas only support reads (not writes).
|
static int |
READ_WRITE_VALUE
Read-write replicas support both reads and writes.
|
static int |
TYPE_UNSPECIFIED_VALUE
Not specified.
|
static int |
WITNESS_VALUE
Witness replicas don't support reads but do participate in voting to
commit writes.
|
| Modifier and Type | Method and Description |
|---|---|
static ReplicaInfo.ReplicaType |
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<ReplicaInfo.ReplicaType> |
internalGetValueMap() |
static ReplicaInfo.ReplicaType |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static ReplicaInfo.ReplicaType |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static ReplicaInfo.ReplicaType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ReplicaInfo.ReplicaType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ReplicaInfo.ReplicaType TYPE_UNSPECIFIED
Not specified.
TYPE_UNSPECIFIED = 0;public static final ReplicaInfo.ReplicaType READ_WRITE
Read-write replicas support both reads and writes. These replicas: * Maintain a full copy of your data. * Serve reads. * Can vote whether to commit a write. * Participate in leadership election. * Are eligible to become a leader.
READ_WRITE = 1;public static final ReplicaInfo.ReplicaType READ_ONLY
Read-only replicas only support reads (not writes). Read-only replicas: * Maintain a full copy of your data. * Serve reads. * Do not participate in voting to commit writes. * Are not eligible to become a leader.
READ_ONLY = 2;public static final ReplicaInfo.ReplicaType WITNESS
Witness replicas don't support reads but do participate in voting to commit writes. Witness replicas: * Do not maintain a full copy of data. * Do not serve reads. * Vote whether to commit writes. * Participate in leader election but are not eligible to become leader.
WITNESS = 3;public static final ReplicaInfo.ReplicaType UNRECOGNIZED
public static final int TYPE_UNSPECIFIED_VALUE
Not specified.
TYPE_UNSPECIFIED = 0;public static final int READ_WRITE_VALUE
Read-write replicas support both reads and writes. These replicas: * Maintain a full copy of your data. * Serve reads. * Can vote whether to commit a write. * Participate in leadership election. * Are eligible to become a leader.
READ_WRITE = 1;public static final int READ_ONLY_VALUE
Read-only replicas only support reads (not writes). Read-only replicas: * Maintain a full copy of your data. * Serve reads. * Do not participate in voting to commit writes. * Are not eligible to become a leader.
READ_ONLY = 2;public static final int WITNESS_VALUE
Witness replicas don't support reads but do participate in voting to commit writes. Witness replicas: * Do not maintain a full copy of data. * Do not serve reads. * Vote whether to commit writes. * Participate in leader election but are not eligible to become leader.
WITNESS = 3;public static ReplicaInfo.ReplicaType[] values()
for (ReplicaInfo.ReplicaType c : ReplicaInfo.ReplicaType.values()) System.out.println(c);
public static ReplicaInfo.ReplicaType 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.EnumLitegetNumber in interface com.google.protobuf.ProtocolMessageEnum@Deprecated public static ReplicaInfo.ReplicaType valueOf(int value)
forNumber(int) instead.value - The numeric wire value of the corresponding enum entry.public static ReplicaInfo.ReplicaType forNumber(int value)
value - The numeric wire value of the corresponding enum entry.public static com.google.protobuf.Internal.EnumLiteMap<ReplicaInfo.ReplicaType> 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 ReplicaInfo.ReplicaType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2020 Google LLC. All rights reserved.