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.



2432
2433
2434
# File 'lib/google/apis/spanner_v1/classes.rb', line 2432

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



2424
2425
2426
# File 'lib/google/apis/spanner_v1/classes.rb', line 2424

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



2430
2431
2432
# File 'lib/google/apis/spanner_v1/classes.rb', line 2430

def include_replicas
  @include_replicas
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2437
2438
2439
2440
# File 'lib/google/apis/spanner_v1/classes.rb', line 2437

def update!(**args)
  @exclude_replicas = args[:exclude_replicas] if args.key?(:exclude_replicas)
  @include_replicas = args[:include_replicas] if args.key?(:include_replicas)
end