Class: Fluent::KinesisHelper::API::BatchRequest::Backoff
- Inherits:
-
Object
- Object
- Fluent::KinesisHelper::API::BatchRequest::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.
169 170 171 |
# File 'lib/fluent/plugin/kinesis_helper/api.rb', line 169 def initialize @count = 0 end |
Instance Method Details
#next ⇒ Object
173 174 175 176 177 |
# File 'lib/fluent/plugin/kinesis_helper/api.rb', line 173 def next value = calc(@count) @count += 1 value end |
#reset ⇒ Object
179 180 181 |
# File 'lib/fluent/plugin/kinesis_helper/api.rb', line 179 def reset @count = 0 end |