public final class ParallelDCPOutput
extends OutputStream
DcpArchiveOutputStream.newParallelDCPOutput(org.python.apache.commons.compress.archivers.zip.ZipArchiveEntry)) that is written as pieces, each written and compressed in
parallel (see ParallelDCPOutput.newStream(java.util.function.Consumer<java.io.OutputStream>)), rather than as bytes.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFERRED_FILE_THRESHOLD
Most bytes of compressed output that a stream from
ParallelDCPOutput.newStream(java.util.function.Consumer<java.io.OutputStream>) keeps in memory: once more is written,
all of it is moved to, and the rest written to, a temporary file instead (deleted once read into the DCP). |
| Modifier and Type | Method and Description |
|---|---|
ParallelDCPInput |
newStream(Consumer<OutputStream> f)
A piece of this file: the data written by f, compressed.
|
void |
write(int b)
Unsupported: the file is only written as pieces, with
ParallelDCPOutput.writePieces(List). |
void |
writePieces(List<? extends Future<ParallelDCPInput>> pieces)
Add the file to the DCP from the given pieces, in order, each as soon as it is done (see
DcpArchiveOutputStream.addRawArchiveEntryFromPieces(org.python.apache.commons.compress.archivers.zip.ZipArchiveEntry, java.util.List<? extends java.util.concurrent.Future<com.xilinx.rapidwright.util.ParallelDCPInput>>)). |
public static final int DEFERRED_FILE_THRESHOLD
ParallelDCPOutput.newStream(java.util.function.Consumer<java.io.OutputStream>) keeps in memory: once more is written,
all of it is moved to, and the rest written to, a temporary file instead (deleted once read into the DCP).public ParallelDCPInput newStream(Consumer<OutputStream> f)
f - Writes the piece's data.public void writePieces(List<? extends Future<ParallelDCPInput>> pieces) throws IOException
DcpArchiveOutputStream.addRawArchiveEntryFromPieces(org.python.apache.commons.compress.archivers.zip.ZipArchiveEntry, java.util.List<? extends java.util.concurrent.Future<com.xilinx.rapidwright.util.ParallelDCPInput>>)).pieces - The pieces, in order, from ParallelDCPOutput.newStream(java.util.function.Consumer<java.io.OutputStream>) (each submitted, or already done), which must not be
used otherwise from now on: a modifiable, random-access list (such as an ArrayList), as each
element is set to null once waited for.IOExceptionpublic void write(int b)
ParallelDCPOutput.writePieces(List).write in class OutputStream