Class: Google::Apis::SpannerV1::DirectedReadOptions

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_replicasGoogle::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_replicasGoogle::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