Package org.apache.bookkeeper.client
Class BatchedReadOp
- java.lang.Object
-
- org.apache.bookkeeper.client.ReadOpBase
-
- org.apache.bookkeeper.client.BatchedReadOp
-
- All Implemented Interfaces:
java.lang.Runnable,BookkeeperInternalCallbacks.BatchedReadEntryCallback
public class BatchedReadOp extends ReadOpBase implements BookkeeperInternalCallbacks.BatchedReadEntryCallback
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classBatchedReadOp.BatchedLedgerEntryRequest(package private) classBatchedReadOp.SequenceReadRequest-
Nested classes/interfaces inherited from class org.apache.bookkeeper.client.ReadOpBase
ReadOpBase.LedgerEntryRequest, ReadOpBase.ReadContext
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intmaxCount(package private) longmaxSize(package private) BatchedReadOp.BatchedLedgerEntryRequestrequest-
Fields inherited from class org.apache.bookkeeper.client.ReadOpBase
allowFailFast, clientCtx, complete, endEntryId, future, heardFromHosts, heardFromHostsBitSet, isRecoveryRead, lh, numPendingEntries, requestTimeNanos, requiredBookiesMissingEntryForRecovery, sentToHosts, speculativeTask, startEntryId
-
-
Constructor Summary
Constructors Constructor Description BatchedReadOp(LedgerHandle lh, ClientContext clientCtx, long startEntryId, int maxCount, long maxSize, boolean isRecoveryRead)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidinitiate()voidreadEntriesComplete(int rc, long ledgerId, long startEntryId, ByteBufList bufList, java.lang.Object ctx)(package private) voidsendReadTo(int bookieIndex, BookieId to, BatchedReadOp.BatchedLedgerEntryRequest entry)protected voidsubmitCallback(int code)-
Methods inherited from class org.apache.bookkeeper.client.ReadOpBase
allowFailFastOnUnwritableChannel, cancelSpeculativeTask, future, getLedgerMetadata, getSpeculativeTask, run, submit
-
-
-
-
Field Detail
-
maxCount
final int maxCount
-
maxSize
final long maxSize
-
request
BatchedReadOp.BatchedLedgerEntryRequest request
-
-
Constructor Detail
-
BatchedReadOp
BatchedReadOp(LedgerHandle lh, ClientContext clientCtx, long startEntryId, int maxCount, long maxSize, boolean isRecoveryRead)
-
-
Method Detail
-
initiate
void initiate()
- Specified by:
initiatein classReadOpBase
-
submitCallback
protected void submitCallback(int code)
- Specified by:
submitCallbackin classReadOpBase
-
readEntriesComplete
public void readEntriesComplete(int rc, long ledgerId, long startEntryId, ByteBufList bufList, java.lang.Object ctx)- Specified by:
readEntriesCompletein interfaceBookkeeperInternalCallbacks.BatchedReadEntryCallback
-
sendReadTo
void sendReadTo(int bookieIndex, BookieId to, BatchedReadOp.BatchedLedgerEntryRequest entry) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
-