Class: Couchbase::Protostellar::RequestBehaviour Private
- Inherits:
-
Object
- Object
- Couchbase::Protostellar::RequestBehaviour
- Defined in:
- lib/couchbase/protostellar/request_behaviour.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #error ⇒ Object readonly private
- #retry_duration ⇒ Object readonly private
Class Method Summary collapse
- .fail(error) ⇒ Object private
- .retry(retry_duration) ⇒ Object private
- .success ⇒ Object private
Instance Method Summary collapse
-
#initialize(retry_duration: nil, error: nil) ⇒ RequestBehaviour
constructor
private
A new instance of RequestBehaviour.
Constructor Details
#initialize(retry_duration: nil, error: nil) ⇒ RequestBehaviour
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.
Returns a new instance of RequestBehaviour.
24 25 26 27 |
# File 'lib/couchbase/protostellar/request_behaviour.rb', line 24 def initialize(retry_duration: nil, error: nil) @retry_duration = retry_duration @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
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.
22 23 24 |
# File 'lib/couchbase/protostellar/request_behaviour.rb', line 22 def error @error end |
#retry_duration ⇒ Object (readonly)
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.
21 22 23 |
# File 'lib/couchbase/protostellar/request_behaviour.rb', line 21 def retry_duration @retry_duration end |
Class Method Details
.fail(error) ⇒ 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.
29 30 31 |
# File 'lib/couchbase/protostellar/request_behaviour.rb', line 29 def self.fail(error) RequestBehaviour.new(error: error) end |
.retry(retry_duration) ⇒ 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.
33 34 35 |
# File 'lib/couchbase/protostellar/request_behaviour.rb', line 33 def self.retry(retry_duration) RequestBehaviour.new(retry_duration: retry_duration) end |
.success ⇒ 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.
37 38 39 |
# File 'lib/couchbase/protostellar/request_behaviour.rb', line 37 def self.success RequestBehaviour.new(retry_duration: nil, error: nil) end |