-
- 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 InputStreamgetInputStream()An input stream that contains the scattered payload abstract voidwriteOut(Array<byte> data, int offset, int length)Writes a piece of payload. abstract voidcloseForWriting()Closes this backing store for further writing. -
-
Method Detail
-
getInputStream
abstract InputStream getInputStream()
An input stream that contains the scattered payload
-
writeOut
abstract void writeOut(Array<byte> data, int offset, int length)
Writes a piece of payload.
- Parameters:
data- the data to writeoffset- offset inside data to start writing fromlength- the amount of data to write
-
closeForWriting
abstract void closeForWriting()
Closes this backing store for further writing.
-
-
-
-