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<BookieId> ensemble,
                            long lId,
                            long eId)
    • Method Detail

      • maybeSendSpeculativeRead

        BookieId 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 ReadOpBase.LedgerEntryRequest
        Parameters:
        heardFrom - the set of hosts that we already received responses.
        Returns:
        host we sent to if we sent. null otherwise.
      • complete

        boolean complete​(int bookieIndex,
                         BookieId host,
                         io.netty.buffer.ByteBuf buffer)
        Description copied from class: PendingReadOp.SingleLedgerEntryRequest
        Complete the read request from host.
        Overrides:
        complete in class PendingReadOp.SingleLedgerEntryRequest
        Parameters:
        bookieIndex - bookie index
        host - host that respond the read
        buffer - the data buffer
        Returns:
        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