Class: Kafka::Protocol::MetadataResponse::PartitionMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/kafka/protocol/metadata_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(partition_error_code:, partition_id:, leader:, replicas: [], isr: []) ⇒ PartitionMetadata

Returns a new instance of PartitionMetadata.


53
54
55
56
57
58
59
# File 'lib/kafka/protocol/metadata_response.rb', line 53

def initialize(partition_error_code:, partition_id:, leader:, replicas: [], isr: [])
  @partition_error_code = partition_error_code
  @partition_id = partition_id
  @leader = leader
  @replicas = replicas
  @isr = isr
end

Instance Attribute Details

#leaderObject (readonly)

Returns the value of attribute leader


49
50
51
# File 'lib/kafka/protocol/metadata_response.rb', line 49

def leader
  @leader
end

#partition_error_codeObject (readonly)

Returns the value of attribute partition_error_code


51
52
53
# File 'lib/kafka/protocol/metadata_response.rb', line 51

def partition_error_code
  @partition_error_code
end

#partition_idObject (readonly)

Returns the value of attribute partition_id


49
50
51
# File 'lib/kafka/protocol/metadata_response.rb', line 49

def partition_id
  @partition_id
end