Class SegmentBufferWriterPool
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.SegmentBufferWriterPool
-
public abstract class SegmentBufferWriterPool extends Object
ThisWriteOperationHandleruses a pool ofSegmentBufferWriters, which it passes to itsexecutemethod.Instances of this class are thread safe.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSegmentBufferWriterPool.PoolTypestatic classSegmentBufferWriterPool.SegmentBufferWriterPoolFactory
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description @NotNull RecordIdexecute(@NotNull GCGeneration gcGeneration, @NotNull org.apache.jackrabbit.oak.segment.WriteOperationHandler.WriteOperation writeOperation)Execute the passedwriteOperationby passing it aSegmentBufferWriter.static SegmentBufferWriterPool.SegmentBufferWriterPoolFactoryfactory(@NotNull SegmentIdProvider idProvider, @NotNull String wid, @NotNull Supplier<GCGeneration> gcGeneration)voidflush(@NotNull SegmentStore store)Flush any pending changes on anySegmentBufferWritermanaged by this instance.@NotNull GCGenerationgetGCGeneration()protected @NotNull StringgetWriterId()protected @NotNull SegmentBufferWriternewWriter(@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 passedwriteOperationby passing it aSegmentBufferWriter.- Parameters:
gcGeneration- theGCGenerationthe changes should persisted with.writeOperation-WriteOperationHandler.WriteOperationto execute- Returns:
RecordIdthat resulted from persisting the changes.- Throws:
IOException
-
flush
public abstract void flush(@NotNull @NotNull SegmentStore store) throws IOExceptionFlush any pending changes on anySegmentBufferWritermanaged by this instance.- Parameters:
store- theSegmentStoreinstance to write theSegmentto- Throws:
IOException
-
-