Package 

Interface MessageBufferInput

  • All Implemented Interfaces:
    java.io.Closeable , java.lang.AutoCloseable

    
    public interface MessageBufferInput
     implements Closeable
                        

    Provides a sequence of MessageBuffer instances.

    A MessageBufferInput implementation has control of lifecycle of the memory so that it can reuse previously allocated memory, use memory pools, or use memory-mapped files.

    • Method Summary

      Modifier and Type Method Description
      abstract MessageBuffer next() Returns a next buffer to read.
      abstract void close() Closes the input.
      • Methods inherited from class java.io.Closeable

        close
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • next

         abstract MessageBuffer next()

        Returns a next buffer to read.

        This method should return a MessageBuffer instance that has data filled in. When this method is called twice,the previously returned buffer is no longer used. Thus implementation of this method can safely discard it.This is useful when it uses a memory pool.

      • close

         abstract void close()

        Closes the input.

        When this method is called, the buffer previously returned from next method is no longer used.Thus implementation of this method can safely discard it.

        If the input is already closed then invoking this method has no effect.