Class: Kafka::Protocol::MetadataResponse::PartitionMetadata
- Inherits:
-
Object
- Object
- Kafka::Protocol::MetadataResponse::PartitionMetadata
- Defined in:
- lib/kafka/protocol/metadata_response.rb
Instance Attribute Summary collapse
-
#leader ⇒ Object
readonly
Returns the value of attribute leader.
-
#partition_error_code ⇒ Object
readonly
Returns the value of attribute partition_error_code.
-
#partition_id ⇒ Object
readonly
Returns the value of attribute partition_id.
Instance Method Summary collapse
-
#initialize(partition_error_code:, partition_id:, leader:, replicas: [], isr: []) ⇒ PartitionMetadata
constructor
A new instance of PartitionMetadata.
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
#leader ⇒ Object (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_code ⇒ Object (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_id ⇒ Object (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 |