Class RPCRequest

  • All Implemented Interfaces:
    java.io.Externalizable , java.io.Serializable , java.lang.Comparable , org.apache.avro.generic.GenericContainer , org.apache.avro.generic.GenericRecord , org.apache.avro.generic.IndexedRecord , org.apache.avro.specific.SpecificRecord

    
    public class RPCRequest
    extends SpecificRecordBase implements SpecificRecord
                        

    Request envelope for RPC message pattern

    • Constructor Detail

      • RPCRequest

        RPCRequest()
        Default constructor.
      • RPCRequest

        RPCRequest(String sender, String correlationKey, Instant sendTime, String replyTopic, Integer replyPartition, ByteBuffer payload)
        All-args constructor.
        Parameters:
        sender - The sender identifier
        correlationKey - Unique identifier
        sendTime - Time ([Instant]) in milliseconds of the request
        replyTopic - The topic the response needs to be posted on
        replyPartition - The partition we expect the response to be on
        payload - The new value for payload
    • Method Detail

      • setSender

         void setSender(String value)

        Sets the value of the 'sender' field. The sender identifier

        Parameters:
        value - the value to set.
      • setCorrelationKey

         void setCorrelationKey(String value)

        Sets the value of the 'correlationKey' field. Unique identifier

        Parameters:
        value - the value to set.
      • setSendTime

         void setSendTime(Instant value)

        Sets the value of the 'sendTime' field. Time ([Instant]) in milliseconds of the request

        Parameters:
        value - the value to set.
      • setReplyTopic

         void setReplyTopic(String value)

        Sets the value of the 'replyTopic' field. The topic the response needs to be posted on

        Parameters:
        value - the value to set.
      • getReplyPartition

         int getReplyPartition()

        Gets the value of the 'replyPartition' field.

      • setReplyPartition

         void setReplyPartition(int value)

        Sets the value of the 'replyPartition' field. The partition we expect the response to be on

        Parameters:
        value - the value to set.
      • setPayload

         void setPayload(ByteBuffer value)

        Sets the value of the 'payload' field.

        Parameters:
        value - the value to set.
      • getEncoder

         static BinaryMessageEncoder<RPCRequest> getEncoder()

        Return the BinaryMessageEncoder instance used by this class.

      • getDecoder

         static BinaryMessageDecoder<RPCRequest> getDecoder()

        Return the BinaryMessageDecoder instance used by this class.

      • createDecoder

         static BinaryMessageDecoder<RPCRequest> createDecoder(SchemaStore resolver)

        Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.

        Parameters:
        resolver - a SchemaStore used to find schemas by fingerprint
      • fromByteBuffer

         static RPCRequest fromByteBuffer(ByteBuffer b)

        Deserializes a RPCRequest from a ByteBuffer.

        Parameters:
        b - a byte buffer holding serialized data for an instance of this class
      • newBuilder

         static RPCRequest.Builder newBuilder(RPCRequest other)

        Creates a new RPCRequest RecordBuilder by copying an existing RPCRequest instance.

        Parameters:
        other - The existing instance to copy.