Class: Rdkafka::Admin::ListOffsetsHandle
- Inherits:
-
Rdkafka::AbstractHandle
- Object
- FFI::Struct
- Rdkafka::AbstractHandle
- Rdkafka::Admin::ListOffsetsHandle
- Defined in:
- lib/rdkafka/admin/list_offsets_handle.rb
Overview
Handle for list offsets operation
Constant Summary
Constants inherited from Rdkafka::AbstractHandle
Rdkafka::AbstractHandle::REGISTRY
Instance Method Summary collapse
-
#create_result ⇒ ListOffsetsReport
Instance with partition offset information.
-
#operation_name ⇒ String
The name of the operation.
-
#raise_error ⇒ Object
Raises an error if the operation failed.
Methods inherited from Rdkafka::AbstractHandle
#initialize, #pending?, register, remove, #unlock, #wait
Methods included from Helpers::Time
#monotonic_now, #monotonic_now_ms
Constructor Details
This class inherits a constructor from Rdkafka::AbstractHandle
Instance Method Details
#create_result ⇒ ListOffsetsReport
Returns instance with partition offset information.
19 20 21 22 23 24 |
# File 'lib/rdkafka/admin/list_offsets_handle.rb', line 19 def create_result ListOffsetsReport.new( result_infos: self[:result_infos], result_count: self[:result_count] ) end |
#operation_name ⇒ String
Returns the name of the operation.
14 15 16 |
# File 'lib/rdkafka/admin/list_offsets_handle.rb', line 14 def operation_name "list offsets" end |
#raise_error ⇒ Object
Raises an error if the operation failed
28 29 30 31 32 33 |
# File 'lib/rdkafka/admin/list_offsets_handle.rb', line 28 def raise_error raise RdkafkaError.new( self[:response], broker_message: self[:response_string].read_string ) end |