Class: LaunchDarkly::Migrations::WriteResult
- Inherits:
-
Object
- Object
- LaunchDarkly::Migrations::WriteResult
- Defined in:
- lib/ldclient-rb/migrations.rb
Overview
A write result contains the operation results against both the authoritative and non-authoritative origins.
Authoritative writes are always executed first. In the event of a failure, the non-authoritative write will not be executed, resulting in a nil value in the final WriteResult.
Instance Attribute Summary collapse
-
#authoritative ⇒ OperationResult
readonly
Returns the operation result for the authoritative origin.
-
#nonauthoritative ⇒ OperationResult?
readonly
Returns the operation result for the non-authoritative origin.
Instance Method Summary collapse
-
#initialize(authoritative, nonauthoritative = nil) ⇒ WriteResult
constructor
A new instance of WriteResult.
Constructor Details
#initialize(authoritative, nonauthoritative = nil) ⇒ WriteResult
Returns a new instance of WriteResult.
77 78 79 80 |
# File 'lib/ldclient-rb/migrations.rb', line 77 def initialize(, = nil) @authoritative = @nonauthoritative = end |
Instance Attribute Details
#authoritative ⇒ OperationResult (readonly)
Returns the operation result for the authoritative origin.
87 88 89 |
# File 'lib/ldclient-rb/migrations.rb', line 87 def @authoritative end |
#nonauthoritative ⇒ OperationResult? (readonly)
Returns the operation result for the non-authoritative origin.
This result might be nil as the non-authoritative write does not execute in every stage, and will not execute if the authoritative write failed.
97 98 99 |
# File 'lib/ldclient-rb/migrations.rb', line 97 def @nonauthoritative end |