Class: Google::Apis::SpannerV1::DirectedReadOptions
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::DirectedReadOptions
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb
Overview
The DirectedReadOptions can be used to indicate which replicas or regions
should be used for non-transactional reads or queries. DirectedReadOptions
can only be specified for a read-only transaction, otherwise the API returns
an INVALID_ARGUMENT error.
Instance Attribute Summary collapse
-
#exclude_replicas ⇒ Google::Apis::SpannerV1::ExcludeReplicas
An ExcludeReplicas contains a repeated set of ReplicaSelection that should be excluded from serving requests.
-
#include_replicas ⇒ Google::Apis::SpannerV1::IncludeReplicas
An
IncludeReplicascontains a repeated set ofReplicaSelectionwhich indicates the order in which replicas should be considered.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DirectedReadOptions
constructor
A new instance of DirectedReadOptions.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DirectedReadOptions
Returns a new instance of DirectedReadOptions.
2357 2358 2359 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2357 def initialize(**args) update!(**args) end |
Instance Attribute Details
#exclude_replicas ⇒ Google::Apis::SpannerV1::ExcludeReplicas
An ExcludeReplicas contains a repeated set of ReplicaSelection that should be
excluded from serving requests.
Corresponds to the JSON property excludeReplicas
2349 2350 2351 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2349 def exclude_replicas @exclude_replicas end |
#include_replicas ⇒ Google::Apis::SpannerV1::IncludeReplicas
An IncludeReplicas contains a repeated set of ReplicaSelection which
indicates the order in which replicas should be considered.
Corresponds to the JSON property includeReplicas
2355 2356 2357 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2355 def include_replicas @include_replicas end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2362 2363 2364 2365 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2362 def update!(**args) @exclude_replicas = args[:exclude_replicas] if args.key?(:exclude_replicas) @include_replicas = args[:include_replicas] if args.key?(:include_replicas) end |