Class: Kafka::Protocol::MetadataResponse::TopicMetadata
- Inherits:
-
Object
- Object
- Kafka::Protocol::MetadataResponse::TopicMetadata
- Defined in:
- lib/kafka/protocol/metadata_response.rb
Instance Attribute Summary collapse
-
#partitions ⇒ Array<PartitionMetadata>
readonly
The partitions in the topic.
-
#topic_error_code ⇒ Object
readonly
Returns the value of attribute topic_error_code.
-
#topic_name ⇒ String
readonly
The name of the topic.
Instance Method Summary collapse
-
#initialize(topic_error_code: 0, topic_name:, partitions:) ⇒ TopicMetadata
constructor
A new instance of TopicMetadata.
Constructor Details
#initialize(topic_error_code: 0, topic_name:, partitions:) ⇒ TopicMetadata
Returns a new instance of TopicMetadata.
59 60 61 62 63 |
# File 'lib/kafka/protocol/metadata_response.rb', line 59 def initialize(topic_error_code: 0, topic_name:, partitions:) @topic_error_code = topic_error_code @topic_name = topic_name @partitions = partitions end |
Instance Attribute Details
#partitions ⇒ Array<PartitionMetadata> (readonly)
Returns the partitions in the topic.
55 56 57 |
# File 'lib/kafka/protocol/metadata_response.rb', line 55 def partitions @partitions end |
#topic_error_code ⇒ Object (readonly)
Returns the value of attribute topic_error_code.
57 58 59 |
# File 'lib/kafka/protocol/metadata_response.rb', line 57 def topic_error_code @topic_error_code end |
#topic_name ⇒ String (readonly)
Returns the name of the topic.
52 53 54 |
# File 'lib/kafka/protocol/metadata_response.rb', line 52 def topic_name @topic_name end |