Interface Batch

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getBatchSize()
      Number of messages that the batch is expected to contain.
      int getHighestSequence()
      Returns the highest sequence number of the batch.
      byte getProtocol()
      Returns the protocol of the sent messages that this batch was constructed from
      boolean isComplete()
      Is the batch complete?
      boolean isEmpty()
      Is the batch currently empty?
      void release()
      Release the resources associated with the batch.
      void setBatchSize​(int batchSize)
      Set the number of messages that the batch is expected to contain.
      int size()
      Current number of messages in the batch
    • Method Detail

      • getProtocol

        byte getProtocol()
        Returns the protocol of the sent messages that this batch was constructed from
        Returns:
        byte - either '1' or '2'
      • getBatchSize

        int getBatchSize()
        Number of messages that the batch is expected to contain.
        Returns:
        int - number of messages
      • setBatchSize

        void setBatchSize​(int batchSize)
        Set the number of messages that the batch is expected to contain.
        Parameters:
        batchSize - int - number of messages
      • getHighestSequence

        int getHighestSequence()
        Returns the highest sequence number of the batch.
        Returns:
      • size

        int size()
        Current number of messages in the batch
        Returns:
        int
      • isEmpty

        boolean isEmpty()
        Is the batch currently empty?
        Returns:
        boolean
      • isComplete

        boolean isComplete()
        Is the batch complete?
        Returns:
        boolean
      • release

        void release()
        Release the resources associated with the batch. Consumers of the batch *must* release after use.