Class: Couchbase::Options::Append
- Inherits:
-
Base
- Object
- Base
- Couchbase::Options::Append
show all
- Defined in:
- lib/couchbase/options.rb,
/code/couchbase-ruby-client/lib/couchbase/options.rb
Overview
Instance Attribute Summary collapse
Attributes inherited from Base
#client_context, #parent_span, #retry_strategy, #timeout
Instance Method Summary
collapse
Constructor Details
#initialize(cas: nil, durability_level: :none, replicate_to: :none, persist_to: :none, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|self| ... } ⇒ Append
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
|
# File 'lib/couchbase/options.rb', line 1219
def initialize(cas: nil,
durability_level: :none,
replicate_to: :none,
persist_to: :none,
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)
@cas = cas
if durability_level != :none && (replicate_to != :none || persist_to != :none)
raise ArgumentError, "durability_level conflicts with replicate_to and persist_to options"
end
@durability_level = durability_level
@replicate_to = replicate_to
@persist_to = persist_to
yield self if block_given?
end
|
Instance Attribute Details
#cas ⇒ Integer
1179
1180
1181
|
# File 'lib/couchbase/options.rb', line 1179
def cas
@cas
end
|
#durability_level ⇒ Symbol
1180
1181
1182
|
# File 'lib/couchbase/options.rb', line 1180
def durability_level
@durability_level
end
|
#persist_to ⇒ Symbol
1182
1183
1184
|
# File 'lib/couchbase/options.rb', line 1182
def persist_to
@persist_to
end
|
#replicate_to ⇒ Symbol
1181
1182
1183
|
# File 'lib/couchbase/options.rb', line 1181
def replicate_to
@replicate_to
end
|