Class: Fluent::KinesisHelper::API::Backoff
- Inherits:
-
Object
- Object
- Fluent::KinesisHelper::API::Backoff
- Defined in:
- lib/fluent/plugin/kinesis_helper/api.rb
Instance Method Summary collapse
-
#initialize ⇒ Backoff
constructor
A new instance of Backoff.
- #next ⇒ Object
- #reset ⇒ Object
Constructor Details
#initialize ⇒ Backoff
Returns a new instance of Backoff.
139 140 141 |
# File 'lib/fluent/plugin/kinesis_helper/api.rb', line 139 def initialize @count = 0 end |
Instance Method Details
#next ⇒ Object
143 144 145 146 147 |
# File 'lib/fluent/plugin/kinesis_helper/api.rb', line 143 def next value = calc(@count) @count += 1 value end |
#reset ⇒ Object
149 150 151 |
# File 'lib/fluent/plugin/kinesis_helper/api.rb', line 149 def reset @count = 0 end |