public class SegmentBufferWriterPool extends Object
WriteOperationHandler uses a pool of SegmentBufferWriters,
which it passes to its execute method.
Instances of this class are thread safe. See also the class comment of
SegmentWriter.
| Modifier and Type | Class and Description |
|---|---|
static interface |
WriteOperationHandler.WriteOperation
A
WriteOperation encapsulates an operation on a SegmentWriter. |
| Constructor and Description |
|---|
SegmentBufferWriterPool(SegmentStore store,
SegmentTracker tracker,
SegmentReader reader,
String wid,
com.google.common.base.Supplier<Integer> gcGeneration) |
| Modifier and Type | Method and Description |
|---|---|
RecordId |
execute(WriteOperationHandler.WriteOperation writeOperation)
Execute the passed
writeOperation by passing it a SegmentBufferWriter. |
void |
flush()
Flush any pending changes on any
SegmentBufferWriter managed by this instance. |
public SegmentBufferWriterPool(@Nonnull SegmentStore store, @Nonnull SegmentTracker tracker, @Nonnull SegmentReader reader, @Nonnull String wid, @Nonnull com.google.common.base.Supplier<Integer> gcGeneration)
@Nonnull public RecordId execute(@Nonnull WriteOperationHandler.WriteOperation writeOperation) throws IOException
writeOperation by passing it a SegmentBufferWriter.writeOperation - WriteOperationHandler.WriteOperation to executeRecordId that resulted from persisting the changes.IOExceptionpublic void flush()
throws IOException
SegmentBufferWriter managed by this instance.IOExceptionCopyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.