Class: Fake::Kafka::Batch

Inherits:
Object
  • Object
show all
Defined in:
lib/fake/kafka/batch.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(topic:, partition:, messages:, highwater_mark_offset:) ⇒ Batch

Returns a new instance of Batch.



4
5
6
7
8
9
# File 'lib/fake/kafka/batch.rb', line 4

def initialize(topic:, partition:, messages:, highwater_mark_offset:)
  @topic = topic
  @partition = partition
  @messages = messages
  @highwater_mark_offset = highwater_mark_offset
end

Instance Attribute Details

#highwater_mark_offsetObject (readonly)

Returns the value of attribute highwater_mark_offset.



2
3
4
# File 'lib/fake/kafka/batch.rb', line 2

def highwater_mark_offset
  @highwater_mark_offset
end

#messagesObject (readonly)

Returns the value of attribute messages.



2
3
4
# File 'lib/fake/kafka/batch.rb', line 2

def messages
  @messages
end

#partitionObject (readonly)

Returns the value of attribute partition.



2
3
4
# File 'lib/fake/kafka/batch.rb', line 2

def partition
  @partition
end

#topicObject (readonly)

Returns the value of attribute topic.



2
3
4
# File 'lib/fake/kafka/batch.rb', line 2

def topic
  @topic
end