Package org.apache.bookkeeper.client
Class ReadLastConfirmedAndEntryOp.ParallelReadRequest
- java.lang.Object
-
- org.apache.bookkeeper.client.ReadLastConfirmedAndEntryOp.ReadLACAndEntryRequest
-
- org.apache.bookkeeper.client.ReadLastConfirmedAndEntryOp.ParallelReadRequest
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Enclosing class:
- ReadLastConfirmedAndEntryOp
class ReadLastConfirmedAndEntryOp.ParallelReadRequest extends ReadLastConfirmedAndEntryOp.ReadLACAndEntryRequest
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intnumPendings-
Fields inherited from class org.apache.bookkeeper.client.ReadLastConfirmedAndEntryOp.ReadLACAndEntryRequest
complete, ensemble, entryImpl, firstError, numMissedEntryReads, orderedEnsemble, rc, writeSet
-
-
Constructor Summary
Constructors Constructor Description ParallelReadRequest(java.util.List<BookieId> ensemble, long lId, long eId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidlogErrorAndReattemptRead(int bookieIndex, BookieId host, java.lang.String errMsg, int rc)Log error errMsg and reattempt read from host.(package private) BookieIdmaybeSendSpeculativeRead(java.util.BitSet heardFromHostsBitSet)Send to next replica speculatively, if required and possible.(package private) voidread()Execute the read request.-
Methods inherited from class org.apache.bookkeeper.client.ReadLastConfirmedAndEntryOp.ReadLACAndEntryRequest
close, complete, fail, getFirstError, getRc, isComplete, toString
-
-
-
-
Constructor Detail
-
ParallelReadRequest
ParallelReadRequest(java.util.List<BookieId> ensemble, long lId, long eId)
-
-
Method Detail
-
read
void read()
Description copied from class:ReadLastConfirmedAndEntryOp.ReadLACAndEntryRequestExecute the read request.- Specified by:
readin classReadLastConfirmedAndEntryOp.ReadLACAndEntryRequest
-
logErrorAndReattemptRead
void logErrorAndReattemptRead(int bookieIndex, BookieId host, java.lang.String errMsg, int rc)Description copied from class:ReadLastConfirmedAndEntryOp.ReadLACAndEntryRequestLog error errMsg and reattempt read from host.- Overrides:
logErrorAndReattemptReadin classReadLastConfirmedAndEntryOp.ReadLACAndEntryRequest- Parameters:
bookieIndex- bookie indexhost- host that just responderrMsg- error msg to logrc- read result code
-
maybeSendSpeculativeRead
BookieId maybeSendSpeculativeRead(java.util.BitSet heardFromHostsBitSet)
Description copied from class:ReadLastConfirmedAndEntryOp.ReadLACAndEntryRequestSend to next replica speculatively, if required and possible. This returns the host we may have sent to for unit testing.- Specified by:
maybeSendSpeculativeReadin classReadLastConfirmedAndEntryOp.ReadLACAndEntryRequest- Parameters:
heardFromHostsBitSet- the set of hosts that we already received responses.- Returns:
- host we sent to if we sent. null otherwise.
-
-