Class PendingAddOp

  • All Implemented Interfaces:
    BookkeeperInternalCallbacks.WriteCallback

    class PendingAddOp
    extends java.lang.Object
    implements BookkeeperInternalCallbacks.WriteCallback
    This represents a pending add operation. When it has got success from all bookies, it sees if its at the head of the pending adds queue, and if yes, sends ack back to the application. If a bookie fails, a replacement is made and placed at the same position in the ensemble. The pending adds are then rereplicated.
    • Field Detail

      • payload

        io.netty.buffer.ByteBuf payload
      • toSend

        io.netty.util.ReferenceCounted toSend
      • ctx

        java.lang.Object ctx
      • entryId

        long entryId
      • entryLength

        int entryLength
      • completed

        boolean completed
      • isRecoveryAdd

        boolean isRecoveryAdd
      • requestTimeNanos

        volatile long requestTimeNanos
      • qwcLatency

        long qwcLatency
      • addEntrySuccessBookies

        java.util.Set<BookieId> addEntrySuccessBookies
      • writeDelayedStartTime

        long writeDelayedStartTime
      • currentLedgerLength

        long currentLedgerLength
      • pendingWriteRequests

        int pendingWriteRequests
      • callbackTriggered

        boolean callbackTriggered
      • hasRun

        boolean hasRun
      • writeFlags

        java.util.EnumSet<WriteFlag> writeFlags
      • allowFailFast

        boolean allowFailFast
      • ensemble

        java.util.List<BookieId> ensemble
    • Method Detail

      • allowFailFastOnUnwritableChannel

        PendingAddOp allowFailFastOnUnwritableChannel()
      • setEntryId

        void setEntryId​(long entryId)
      • setLedgerLength

        void setLedgerLength​(long ledgerLength)
      • getEntryId

        long getEntryId()
      • maybeTimeout

        boolean maybeTimeout()
      • timeoutQuorumWait

        void timeoutQuorumWait()
      • unsetSuccessAndSendWriteRequest

        void unsetSuccessAndSendWriteRequest​(java.util.List<BookieId> ensemble,
                                             int bookieIndex)
      • initiate

        public void initiate()
        Initiate the add operation.
      • sendAddSuccessCallbacks

        void sendAddSuccessCallbacks()
      • submitCallback

        void submitCallback​(int rc)
      • toString

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

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • recyclePendAddOpObject

        public void recyclePendAddOpObject()