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


41
42
43
44
45
46
47
# File 'lib/kafka/protocol/metadata_response.rb', line 41

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


37
38
39
# File 'lib/kafka/protocol/metadata_response.rb', line 37

def leader
  @leader
end

#partition_error_codeObject (readonly)

Returns the value of attribute partition_error_code


39
40
41
# File 'lib/kafka/protocol/metadata_response.rb', line 39

def partition_error_code
  @partition_error_code
end

#partition_idObject (readonly)

Returns the value of attribute partition_id


37
38
39
# File 'lib/kafka/protocol/metadata_response.rb', line 37

def partition_id
  @partition_id
end