Class: Thrifter::Retry::Proxy

Inherits:
BasicObject
Defined in:
lib/thrifter/extensions/retriable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, tries, interval, retriable) ⇒ Proxy

Returns a new instance of Proxy.



23
24
25
26
27
28
# File 'lib/thrifter/extensions/retriable.rb', line 23

def initialize(client, tries, interval, retriable)
  @client = client
  @tries = tries
  @interval = interval
  @retriable = DEFAULT_RETRIABLE_ERRORS + Array(retriable)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object (private)



32
33
34
# File 'lib/thrifter/extensions/retriable.rb', line 32

def method_missing(name, *args)
  invoke_with_retry(name, *args)
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



21
22
23
# File 'lib/thrifter/extensions/retriable.rb', line 21

def client
  @client
end

#intervalObject (readonly)

Returns the value of attribute interval.



21
22
23
# File 'lib/thrifter/extensions/retriable.rb', line 21

def interval
  @interval
end

#retriableObject (readonly)

Returns the value of attribute retriable.



21
22
23
# File 'lib/thrifter/extensions/retriable.rb', line 21

def retriable
  @retriable
end

#triesObject (readonly)

Returns the value of attribute tries.



21
22
23
# File 'lib/thrifter/extensions/retriable.rb', line 21

def tries
  @tries
end