Class ReadOpBase

  • All Implemented Interfaces:
    java.lang.Runnable
    Direct Known Subclasses:
    BatchedReadOp, PendingReadOp

    public abstract class ReadOpBase
    extends java.lang.Object
    implements java.lang.Runnable
    • Field Detail

      • speculativeTask

        protected java.util.concurrent.ScheduledFuture<?> speculativeTask
      • future

        protected final java.util.concurrent.CompletableFuture<LedgerEntries> future
      • heardFromHosts

        protected final java.util.Set<BookieId> heardFromHosts
      • heardFromHostsBitSet

        protected final java.util.BitSet heardFromHostsBitSet
      • sentToHosts

        protected final java.util.Set<BookieId> sentToHosts
      • startEntryId

        protected final long startEntryId
      • requestTimeNanos

        protected long requestTimeNanos
      • requiredBookiesMissingEntryForRecovery

        protected final int requiredBookiesMissingEntryForRecovery
      • isRecoveryRead

        protected final boolean isRecoveryRead
      • complete

        protected final java.util.concurrent.atomic.AtomicBoolean complete
      • allowFailFast

        protected boolean allowFailFast
      • numPendingEntries

        long numPendingEntries
      • endEntryId

        final long endEntryId
    • Constructor Detail

      • ReadOpBase

        protected ReadOpBase​(LedgerHandle lh,
                             ClientContext clientCtx,
                             long startEntryId,
                             long endEntryId,
                             boolean isRecoveryRead)
    • Method Detail

      • cancelSpeculativeTask

        protected void cancelSpeculativeTask​(boolean mayInterruptIfRunning)
      • getSpeculativeTask

        public java.util.concurrent.ScheduledFuture<?> getSpeculativeTask()
      • future

        java.util.concurrent.CompletableFuture<LedgerEntries> future()
      • allowFailFastOnUnwritableChannel

        void allowFailFastOnUnwritableChannel()
      • submit

        public void submit()
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • initiate

        abstract void initiate()
      • submitCallback

        protected abstract void submitCallback​(int code)