Class: SuckerPunch::Counter::Processed
- Inherits:
-
Object
- Object
- SuckerPunch::Counter::Processed
- Includes:
- Utilities
- Defined in:
- lib/sucker_punch/counter.rb
Constant Summary collapse
- COUNTER =
Concurrent::Map.new do |hash, name| hash.compute_if_absent(name) { Concurrent::AtomicFixnum.new } end
Instance Attribute Summary collapse
-
#counter ⇒ Object
readonly
Returns the value of attribute counter.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(queue_name) ⇒ Processed
constructor
A new instance of Processed.
Methods included from Utilities
#decrement, #increment, #value
Constructor Details
Instance Attribute Details
#counter ⇒ Object (readonly)
Returns the value of attribute counter.
36 37 38 |
# File 'lib/sucker_punch/counter.rb', line 36 def counter @counter end |
Class Method Details
.clear ⇒ Object
44 45 46 |
# File 'lib/sucker_punch/counter.rb', line 44 def self.clear COUNTER.clear end |