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.
-
#replicas ⇒ Object
readonly
Returns the value of attribute replicas.
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.
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
#leader ⇒ Object (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_code ⇒ Object (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_id ⇒ Object (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 |
#replicas ⇒ Object (readonly)
Returns the value of attribute replicas.
37 38 39 |
# File 'lib/kafka/protocol/metadata_response.rb', line 37 def replicas @replicas end |