Class: Rdkafka::Admin::CreatePartitionsHandle

Inherits:
Rdkafka::AbstractHandle show all
Defined in:
lib/rdkafka/admin/create_partitions_handle.rb

Overview

Handle for create partitions operation

Constant Summary

Constants inherited from Rdkafka::AbstractHandle

Rdkafka::AbstractHandle::REGISTRY

Instance Attribute Summary

Attributes inherited from Rdkafka::AbstractHandle

#broker_message, #result

Instance Method Summary collapse

Methods inherited from Rdkafka::AbstractHandle

#initialize, #pending?, #prepared_result, 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_resultCreatePartitionsReport

Returns report prepared by the background event callback.

Returns:



14
15
16
# File 'lib/rdkafka/admin/create_partitions_handle.rb', line 14

def create_result
  prepared_result
end

#operation_nameString

Returns the name of the operation.

Returns:

  • (String)

    the name of the operation



9
10
11
# File 'lib/rdkafka/admin/create_partitions_handle.rb', line 9

def operation_name
  "create partitions"
end

#raise_errorObject

Raises an error if the operation failed

Raises:



20
21
22
23
24
25
# File 'lib/rdkafka/admin/create_partitions_handle.rb', line 20

def raise_error
  raise RdkafkaError.new(
    self[:response],
    broker_message: broker_message
  )
end