Class SegmentBufferWriterPool
java.lang.Object
org.apache.jackrabbit.oak.segment.SegmentBufferWriterPool
This
WriteOperationHandler
uses a pool of SegmentBufferWriter
s,
which it passes to its execute
method.
Instances of this class are thread safe.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static class
-
Method Summary
Modifier and TypeMethodDescription@NotNull RecordId
execute
(@NotNull GCGeneration gcGeneration, @NotNull org.apache.jackrabbit.oak.segment.WriteOperationHandler.WriteOperation writeOperation) Execute the passedwriteOperation
by passing it aSegmentBufferWriter
.factory
(@NotNull SegmentIdProvider idProvider, @NotNull String wid, @NotNull Supplier<GCGeneration> gcGeneration) void
flush
(@NotNull SegmentStore store) Flush any pending changes on anySegmentBufferWriter
managed by this instance.@NotNull GCGeneration
protected @NotNull String
protected @NotNull SegmentBufferWriter
newWriter
(@NotNull GCGeneration gcGeneration)
-
Method Details
-
factory
public static SegmentBufferWriterPool.SegmentBufferWriterPoolFactory factory(@NotNull @NotNull SegmentIdProvider idProvider, @NotNull @NotNull String wid, @NotNull @NotNull Supplier<GCGeneration> gcGeneration) -
getGCGeneration
-
newWriter
@NotNull protected @NotNull SegmentBufferWriter newWriter(@NotNull @NotNull GCGeneration gcGeneration) -
getWriterId
-
execute
@NotNull @NotNull RecordId execute(@NotNull @NotNull GCGeneration gcGeneration, @NotNull @NotNull org.apache.jackrabbit.oak.segment.WriteOperationHandler.WriteOperation writeOperation) throws IOException Execute the passedwriteOperation
by passing it aSegmentBufferWriter
.- Parameters:
gcGeneration
- theGCGeneration
the changes should persisted with.writeOperation
-WriteOperationHandler.WriteOperation
to execute- Returns:
RecordId
that resulted from persisting the changes.- Throws:
IOException
-
flush
Flush any pending changes on anySegmentBufferWriter
managed by this instance.- Parameters:
store
- theSegmentStore
instance to write theSegment
to- Throws:
IOException
-