Class SegmentBufferWriterPool
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.SegmentBufferWriterPool
-
public abstract class SegmentBufferWriterPool extends Object
ThisWriteOperationHandler
uses a pool ofSegmentBufferWriter
s, which it passes to itsexecute
method.Instances of this class are thread safe.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SegmentBufferWriterPool.PoolType
static class
SegmentBufferWriterPool.SegmentBufferWriterPoolFactory
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description @NotNull RecordId
execute(@NotNull GCGeneration gcGeneration, @NotNull org.apache.jackrabbit.oak.segment.WriteOperationHandler.WriteOperation writeOperation)
Execute the passedwriteOperation
by passing it aSegmentBufferWriter
.static SegmentBufferWriterPool.SegmentBufferWriterPoolFactory
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
getGCGeneration()
protected @NotNull String
getWriterId()
protected @NotNull SegmentBufferWriter
newWriter(@NotNull GCGeneration gcGeneration)
-
-
-
Method Detail
-
factory
public static SegmentBufferWriterPool.SegmentBufferWriterPoolFactory factory(@NotNull @NotNull SegmentIdProvider idProvider, @NotNull @NotNull String wid, @NotNull @NotNull Supplier<GCGeneration> gcGeneration)
-
getGCGeneration
@NotNull public @NotNull GCGeneration getGCGeneration()
-
newWriter
@NotNull protected @NotNull SegmentBufferWriter newWriter(@NotNull @NotNull GCGeneration gcGeneration)
-
getWriterId
@NotNull protected @NotNull String getWriterId()
-
execute
@NotNull public abstract @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
public abstract void flush(@NotNull @NotNull SegmentStore store) throws IOException
Flush any pending changes on anySegmentBufferWriter
managed by this instance.- Parameters:
store
- theSegmentStore
instance to write theSegment
to- Throws:
IOException
-
-