Class ReadLastConfirmedAndEntryOp

  • All Implemented Interfaces:
    SpeculativeRequestExecutor, org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.ReadEntryCallback

    class ReadLastConfirmedAndEntryOp
    extends java.lang.Object
    implements org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.ReadEntryCallback, SpeculativeRequestExecutor
    Long poll read operation.
    • Field Detail

      • LOG

        static final org.slf4j.Logger LOG
      • heardFromHostsBitSet

        final java.util.BitSet heardFromHostsBitSet
      • emptyResponsesFromHostsBitSet

        final java.util.BitSet emptyResponsesFromHostsBitSet
      • maxMissedReadsAllowed

        final int maxMissedReadsAllowed
      • parallelRead

        boolean parallelRead
      • requestComplete

        final java.util.concurrent.atomic.AtomicBoolean requestComplete
      • requestTimeNano

        final long requestTimeNano
    • Method Detail

      • cancelSpeculativeTask

        protected void cancelSpeculativeTask​(boolean mayInterruptIfRunning)
      • issueSpeculativeRequest

        public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> issueSpeculativeRequest()
        Speculative Read Logic.
        Specified by:
        issueSpeculativeRequest in interface SpeculativeRequestExecutor
        Returns:
        whether more speculative requests should be issued
      • initiate

        public void initiate()
      • readEntryComplete

        public void readEntryComplete​(int rc,
                                      long ledgerId,
                                      long entryId,
                                      io.netty.buffer.ByteBuf buffer,
                                      java.lang.Object ctx)
        Specified by:
        readEntryComplete in interface org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.ReadEntryCallback
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object