Class: Rdkafka::Admin::CreateAclHandle

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

Overview

Handle for create ACL operation

Constant Summary

Constants inherited from Rdkafka::AbstractHandle

Rdkafka::AbstractHandle::REGISTRY

Instance Method Summary collapse

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_resultCreateAclReport

Returns instance with rdkafka_response value as 0 and rdkafka_response_string value as empty string if the acl creation was successful.

Returns:

  • (CreateAclReport)

    instance with rdkafka_response value as 0 and rdkafka_response_string value as empty string if the acl creation was successful



17
18
19
# File 'lib/rdkafka/admin/create_acl_handle.rb', line 17

def create_result
  CreateAclReport.new(rdkafka_response: self[:response], rdkafka_response_string: self[:response_string])
end

#operation_nameString

Returns the name of the operation.

Returns:

  • (String)

    the name of the operation



12
13
14
# File 'lib/rdkafka/admin/create_acl_handle.rb', line 12

def operation_name
  "create acl"
end

#raise_errorObject

Raises an error if the operation failed

Raises:



23
24
25
26
27
28
# File 'lib/rdkafka/admin/create_acl_handle.rb', line 23

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