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 may
only be specified for a read-only transaction, otherwise the API will return
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 IncludeReplicas contains a repeated set of ReplicaSelection which 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.
2309 2310 2311 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2309 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
2301 2302 2303 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2301 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
2307 2308 2309 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2307 def include_replicas @include_replicas end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2314 2315 2316 2317 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2314 def update!(**args) @exclude_replicas = args[:exclude_replicas] if args.key?(:exclude_replicas) @include_replicas = args[:include_replicas] if args.key?(:include_replicas) end |