Class: CC::Kafka::OffsetStorage::Memory
- Inherits:
-
Struct
- Object
- Struct
- CC::Kafka::OffsetStorage::Memory
- Defined in:
- lib/cc/kafka/offset_storage/memory.rb
Instance Attribute Summary collapse
-
#current ⇒ Object
Returns the value of attribute current.
-
#partition ⇒ Object
Returns the value of attribute partition.
-
#topic ⇒ Object
Returns the value of attribute topic.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#current ⇒ Object
Returns the value of attribute current
4 5 6 |
# File 'lib/cc/kafka/offset_storage/memory.rb', line 4 def current @current end |
#partition ⇒ Object
Returns the value of attribute partition
4 5 6 |
# File 'lib/cc/kafka/offset_storage/memory.rb', line 4 def partition @partition end |
#topic ⇒ Object
Returns the value of attribute topic
4 5 6 |
# File 'lib/cc/kafka/offset_storage/memory.rb', line 4 def topic @topic end |
Class Method Details
.find_or_create!(attrs) ⇒ Object
5 6 7 |
# File 'lib/cc/kafka/offset_storage/memory.rb', line 5 def self.find_or_create!(attrs) @offset ||= new(attrs[:topic], attrs[:partition], nil) end |
Instance Method Details
#set(attrs) ⇒ Object
9 10 11 |
# File 'lib/cc/kafka/offset_storage/memory.rb', line 9 def set(attrs) attrs.each { |k, v| self[k] = v } end |