Package 

Interface ScatterGatherBackingStore

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

    
    public interface ScatterGatherBackingStore
     implements Closeable
                        

    Store intermediate payload in a scatter-gather scenario. Multiple threads write their payload to a backing store, which can subsequently be reversed to an InputStream to be used as input in the gather phase.

    It is the responsibility of the allocator of an instance of this class to close this. Closing it should clear off any allocated structures and preferably delete files.

    • Method Summary

      Modifier and Type Method Description
      abstract InputStream getInputStream() An input stream that contains the scattered payload
      abstract void writeOut(Array<byte> data, int offset, int length) Writes a piece of payload.
      abstract void closeForWriting() Closes this backing store for further writing.
      • 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

      • writeOut

         abstract void writeOut(Array<byte> data, int offset, int length)

        Writes a piece of payload.

        Parameters:
        data - the data to write
        offset - offset inside data to start writing from
        length - the amount of data to write
      • closeForWriting

         abstract void closeForWriting()

        Closes this backing store for further writing.