Class: Px::Service::Client::RetriableResponseFuture

Inherits:
Future
  • Object
show all
Defined in:
lib/px/service/client/retriable_response_future.rb

Direct Known Subclasses

CircuitBreakerRetriableResponseFuture

Constant Summary collapse

DEFAULT_RETRIES =
3

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Future

#complete, #completed?, #method_missing, #respond_to_missing?, #value, #value!

Constructor Details

#initialize(request = nil, retries: DEFAULT_RETRIES) ⇒ RetriableResponseFuture

Returns a new instance of RetriableResponseFuture.



11
12
13
14
15
16
# File 'lib/px/service/client/retriable_response_future.rb', line 11

def initialize(request = nil, retries: DEFAULT_RETRIES)
  super()

  @retries = retries
  self.request = request if request
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Px::Service::Client::Future

Instance Attribute Details

#hydraObject

Returns the value of attribute hydra.



9
10
11
# File 'lib/px/service/client/retriable_response_future.rb', line 9

def hydra
  @hydra
end

#requestObject

Returns the value of attribute request.



9
10
11
# File 'lib/px/service/client/retriable_response_future.rb', line 9

def request
  @request
end