Class: Google::Spanner::Admin::Instance::V1::ReplicaInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/spanner/admin/instance/v1/doc/google/spanner/admin/instance/v1/spanner_instance_admin.rb

Defined Under Namespace

Modules: ReplicaType

Instance Attribute Summary collapse

Instance Attribute Details

#default_leader_locationtrue, false



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/google/cloud/spanner/admin/instance/v1/doc/google/spanner/admin/instance/v1/spanner_instance_admin.rb', line 33

class ReplicaInfo
  # Indicates the type of replica.  See the [replica types
  # documentation](https://cloud.google.com/spanner/docs/replication#replica_types)
  # for more details.
  module ReplicaType
    # Not specified.
    TYPE_UNSPECIFIED = 0

    # 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

    # 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

    # 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
  end
end

#locationString



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/google/cloud/spanner/admin/instance/v1/doc/google/spanner/admin/instance/v1/spanner_instance_admin.rb', line 33

class ReplicaInfo
  # Indicates the type of replica.  See the [replica types
  # documentation](https://cloud.google.com/spanner/docs/replication#replica_types)
  # for more details.
  module ReplicaType
    # Not specified.
    TYPE_UNSPECIFIED = 0

    # 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

    # 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

    # 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
  end
end

#typeGoogle::Spanner::Admin::Instance::V1::ReplicaInfo::ReplicaType



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/google/cloud/spanner/admin/instance/v1/doc/google/spanner/admin/instance/v1/spanner_instance_admin.rb', line 33

class ReplicaInfo
  # Indicates the type of replica.  See the [replica types
  # documentation](https://cloud.google.com/spanner/docs/replication#replica_types)
  # for more details.
  module ReplicaType
    # Not specified.
    TYPE_UNSPECIFIED = 0

    # 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

    # 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

    # 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
  end
end