Class PendingReadOp.SequenceReadRequest

    • Field Detail

      • nextReplicaIndexToReadFrom

        int nextReplicaIndexToReadFrom
      • sentReplicas

        final java.util.BitSet sentReplicas
      • erroredReplicas

        final java.util.BitSet erroredReplicas
    • Constructor Detail

      • SequenceReadRequest

        SequenceReadRequest​(java.util.List<> ensemble,
                            long lId,
                            long eId)
    • Method Detail

      • maybeSendSpeculativeRead maybeSendSpeculativeRead​(java.util.BitSet heardFrom)
        Send to next replica speculatively, if required and possible. This returns the host we may have sent to for unit testing.
        Specified by:
        maybeSendSpeculativeRead in class PendingReadOp.LedgerEntryRequest
        heardFrom - the set of hosts that we already received responses.
        host we sent to if we sent. null otherwise.
      • sendNextRead sendNextRead()
      • logErrorAndReattemptRead

        void logErrorAndReattemptRead​(int bookieIndex,
                                      java.lang.String errMsg,
                                      int rc)
        Description copied from class: PendingReadOp.LedgerEntryRequest
        Log error errMsg and reattempt read from host.
        logErrorAndReattemptRead in class PendingReadOp.LedgerEntryRequest
        bookieIndex - bookie index
        host - host that just respond
        errMsg - error msg to log
        rc - read result code
      • complete

        boolean complete​(int bookieIndex,
                         io.netty.buffer.ByteBuf buffer)
        Description copied from class: PendingReadOp.LedgerEntryRequest
        Complete the read request from host.
        complete in class PendingReadOp.LedgerEntryRequest
        bookieIndex - bookie index
        host - host that respond the read
        buffer - the data buffer
        return true if we managed to complete the entry; otherwise return false if the read entry is not complete or it is already completed before