Class: Voltdb::ProcCallback

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

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ ProcCallback

Returns a new instance of ProcCallback.



6
7
8
# File 'lib/voltdb/callbacks.rb', line 6

def initialize(&block)
  @block = block
end

Instance Method Details

#client_callback(client_response) ⇒ Object

Implementation of callback to be provided by client applications

Parameters:

  • client_response (Java::OrgVoltdbClient::ClientResponse)

    response to the stored procedure invocation this callback is associated with

Raises:

  • exceptions from the caller method



15
16
17
18
# File 'lib/voltdb/callbacks.rb', line 15

def client_callback(client_response)
  client_response.extend(ClientResponseUtils)
  @block.call(client_response)
end