Class: Kafka::FetchedBatch
- Inherits:
-
Object
- Object
- Kafka::FetchedBatch
- Defined in:
- lib/kafka/fetched_batch.rb
Instance Attribute Summary collapse
-
#highwater_mark_offset ⇒ Object
readonly
Returns the value of attribute highwater_mark_offset.
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
-
#partition ⇒ Object
readonly
Returns the value of attribute partition.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(topic:, partition:, highwater_mark_offset:, messages:) ⇒ FetchedBatch
constructor
A new instance of FetchedBatch.
Constructor Details
#initialize(topic:, partition:, highwater_mark_offset:, messages:) ⇒ FetchedBatch
Returns a new instance of FetchedBatch.
5 6 7 8 9 10 |
# File 'lib/kafka/fetched_batch.rb', line 5 def initialize(topic:, partition:, highwater_mark_offset:, messages:) @topic = topic @partition = partition @highwater_mark_offset = highwater_mark_offset @messages = end |
Instance Attribute Details
#highwater_mark_offset ⇒ Object (readonly)
Returns the value of attribute highwater_mark_offset.
3 4 5 |
# File 'lib/kafka/fetched_batch.rb', line 3 def highwater_mark_offset @highwater_mark_offset end |
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
3 4 5 |
# File 'lib/kafka/fetched_batch.rb', line 3 def @messages end |
#partition ⇒ Object (readonly)
Returns the value of attribute partition.
3 4 5 |
# File 'lib/kafka/fetched_batch.rb', line 3 def partition @partition end |
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
3 4 5 |
# File 'lib/kafka/fetched_batch.rb', line 3 def topic @topic end |
Instance Method Details
#empty? ⇒ Boolean
12 13 14 |
# File 'lib/kafka/fetched_batch.rb', line 12 def empty? @messages.empty? end |