Class SegmentBufferWriterPool


  • public abstract class SegmentBufferWriterPool
    extends java.lang.Object
    This WriteOperationHandler uses a pool of SegmentBufferWriters, which it passes to its execute method.

    Instances of this class are thread safe.

    • Method Detail

      • getGCGeneration

        @NotNull
        public @NotNull GCGeneration getGCGeneration()
      • getWriterId

        @NotNull
        protected @NotNull java.lang.String getWriterId()
      • execute

        @NotNull
        public abstract @NotNull RecordId execute​(@NotNull
                                                  @NotNull GCGeneration gcGeneration,
                                                  @NotNull
                                                  @NotNull org.apache.jackrabbit.oak.segment.WriteOperationHandler.WriteOperation writeOperation)
                                           throws java.io.IOException
        Execute the passed writeOperation by passing it a SegmentBufferWriter.
        Parameters:
        gcGeneration - the GCGeneration the changes should persisted with.
        writeOperation - WriteOperationHandler.WriteOperation to execute
        Returns:
        RecordId that resulted from persisting the changes.
        Throws:
        java.io.IOException
      • flush

        public abstract void flush​(@NotNull
                                   @NotNull SegmentStore store)
                            throws java.io.IOException
        Flush any pending changes on any SegmentBufferWriter managed by this instance.
        Parameters:
        store - the SegmentStore instance to write the Segment to
        Throws:
        java.io.IOException