Class ControlTunnel.CustomTunnel<SEND,RECEIVE>

java.lang.Object
org.apache.drill.exec.rpc.control.ControlTunnel.CustomTunnel<SEND,RECEIVE>
Type Parameters:
SEND - The type of message the control tunnel will be able to send.
RECEIVE - The expected response the control tunnel expects to receive.
Enclosing class:
ControlTunnel

public class ControlTunnel.CustomTunnel<SEND,RECEIVE> extends Object
A special tunnel that can be used for custom types of messages. Its lifecycle is tied to the underlying ControlTunnel.
  • Method Details

    • send

      public ControlTunnel.CustomFuture<RECEIVE> send(SEND messageToSend, io.netty.buffer.ByteBuf... dataBodies)
      Send a message and receive a future for monitoring the outcome.
      Parameters:
      messageToSend - The structured message to send.
      dataBodies - One or more optional unstructured messages to append to the structure message.
      Returns:
      The CustomFuture that can be used to wait for the response.
    • send

      public void send(RpcOutcomeListener<RECEIVE> listener, SEND messageToSend, io.netty.buffer.ByteBuf... dataBodies)
      Send a message using a custom listener.
      Parameters:
      listener - The listener to inform of the outcome of the sent message.
      messageToSend - The structured message to send.
      dataBodies - One or more optional unstructured messages to append to the structure message.