Interface ScatterGatherBackingStore
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
FileBasedScatterGatherBackingStore
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.
- Since:
- 1.10
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Closes this backing store for further writing.An input stream that contains the scattered payloadvoid
writeOut
(byte[] data, int offset, int length) Writes a piece of payload.
-
Method Details
-
closeForWriting
Closes this backing store for further writing.- Throws:
IOException
- when something fails
-
getInputStream
An input stream that contains the scattered payload- Returns:
- An InputStream, should be closed by the caller of this method.
- Throws:
IOException
- when something fails
-
writeOut
Writes a piece of payload.- Parameters:
data
- the data to writeoffset
- offset inside data to start writing fromlength
- the amount of data to write- Throws:
IOException
- when something fails
-