Class: Couchbase::Options::LookupInAnyReplica
- Defined in:
- lib/couchbase/options.rb
Overview
Options for Collection#lookup_in_any_replica
Constant Summary collapse
- DEFAULT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
LookupInAnyReplica.new.freeze
Instance Attribute Summary collapse
- #access_deleted ⇒ Boolean private
- #read_preference ⇒ Symbol
- #transcoder ⇒ JsonTranscoder, #decode(String)
Attributes inherited from Base
#client_context, #parent_span, #retry_strategy, #timeout
Instance Method Summary collapse
-
#initialize(transcoder: JsonTranscoder.new, read_preference: :no_preference, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|self| ... } ⇒ LookupInAnyReplica
constructor
Creates an instance of options for Collection#lookup_in_any_replica.
- #to_backend ⇒ Object private
Constructor Details
#initialize(transcoder: JsonTranscoder.new, read_preference: :no_preference, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|self| ... } ⇒ LookupInAnyReplica
Creates an instance of options for Collection#lookup_in_any_replica
1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 |
# File 'lib/couchbase/options.rb', line 1064 def initialize(transcoder: JsonTranscoder.new, read_preference: :no_preference, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span) @transcoder = transcoder @read_preference = read_preference yield self if block_given? end |
Instance Attribute Details
#access_deleted ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1086 1087 1088 |
# File 'lib/couchbase/options.rb', line 1086 def access_deleted @access_deleted end |
#read_preference ⇒ Symbol
1049 1050 1051 |
# File 'lib/couchbase/options.rb', line 1049 def read_preference @read_preference end |
#transcoder ⇒ JsonTranscoder, #decode(String)
1048 1049 1050 |
# File 'lib/couchbase/options.rb', line 1048 def transcoder @transcoder end |
Instance Method Details
#to_backend ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1077 1078 1079 1080 1081 1082 |
# File 'lib/couchbase/options.rb', line 1077 def to_backend { timeout: Utils::Time.extract_duration(@timeout), read_preference: @read_preference, } end |