public class EventOutputStreams extends Object implements Closeable
OutputStream
instances that can concurrently write to the same file and do lots of other
wonderful magical things (excluding changing the baby's nappy).
FolderComputation.createEventsListener()
where there may be multiple concurrent events in flight and we need to:
Modifier and Type | Class and Description |
---|---|
static class |
EventOutputStreams.OutputFile
Supplies the current output file destination.
|
Constructor and Description |
---|
EventOutputStreams(EventOutputStreams.OutputFile outputFile,
boolean append) |
EventOutputStreams(EventOutputStreams.OutputFile outputFile,
boolean append,
int fileCount) |
EventOutputStreams(EventOutputStreams.OutputFile outputFile,
long flushInterval,
TimeUnit flushIntervalUnits,
int flushSize,
boolean append,
long rotateSize,
int fileCount) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
OutputStream |
get()
Gets a new
OutputStream , the caller must close the stream in order to ensure all its output gets written. |
public EventOutputStreams(EventOutputStreams.OutputFile outputFile, boolean append)
public EventOutputStreams(EventOutputStreams.OutputFile outputFile, boolean append, int fileCount)
public EventOutputStreams(EventOutputStreams.OutputFile outputFile, long flushInterval, TimeUnit flushIntervalUnits, int flushSize, boolean append, long rotateSize, int fileCount)
public OutputStream get()
OutputStream
, the caller must close the stream in order to ensure all its output gets written.OutputStream
.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2016–2020. All rights reserved.