Class: Voltdb::AllPartitionProcCallback

Inherits:
Object
  • Object
show all
Includes:
Java::OrgVoltdbClient::AllPartitionProcedureCallback
Defined in:
lib/voltdb/callbacks.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ AllPartitionProcCallback

Returns a new instance of AllPartitionProcCallback.



69
70
71
# File 'lib/voltdb/callbacks.rb', line 69

def initialize(&block)
  @block = block
end

Instance Method Details

#client_callback(client_response_with_partition_key) ⇒ Object

Implementation of callback to be provided by client applications

Parameters:

  • client_response_with_partition_key
    Java::OrgVoltdbClient::AllPartitionProcedureCallback

    responses for

    each partition to the stored procedure invocation this callback is associated with

Raises:

  • exceptions from the caller method



80
81
82
83
84
85
86
87
# File 'lib/voltdb/callbacks.rb', line 80

def client_callback(client_response_with_partition_key)
  response = client_response_with_partition_key.map do |partition|
    partition.response.extend(ClientResponseUtils)
    partition
  end

  @block.call(response)
end