Package org.apache.bookkeeper.client
Class BatchedReadOp
java.lang.Object
org.apache.bookkeeper.client.ReadOpBase
org.apache.bookkeeper.client.BatchedReadOp
- All Implemented Interfaces:
Runnable,BookkeeperInternalCallbacks.BatchedReadEntryCallback
public class BatchedReadOp
extends ReadOpBase
implements BookkeeperInternalCallbacks.BatchedReadEntryCallback
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) classNested classes/interfaces inherited from class org.apache.bookkeeper.client.ReadOpBase
ReadOpBase.LedgerEntryRequest, ReadOpBase.ReadContext -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final int(package private) final long(package private) BatchedReadOp.BatchedLedgerEntryRequestFields 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
ConstructorsConstructorDescriptionBatchedReadOp(LedgerHandle lh, ClientContext clientCtx, long startEntryId, int maxCount, long maxSize, boolean isRecoveryRead) -
Method Summary
Modifier and TypeMethodDescription(package private) voidinitiate()voidreadEntriesComplete(int rc, long ledgerId, long startEntryId, ByteBufList bufList, 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 Details
-
maxCount
final int maxCount -
maxSize
final long maxSize -
request
-
-
Constructor Details
-
BatchedReadOp
BatchedReadOp(LedgerHandle lh, ClientContext clientCtx, long startEntryId, int maxCount, long maxSize, boolean isRecoveryRead)
-
-
Method Details
-
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, Object ctx) - Specified by:
readEntriesCompletein interfaceBookkeeperInternalCallbacks.BatchedReadEntryCallback
-
sendReadTo
void sendReadTo(int bookieIndex, BookieId to, BatchedReadOp.BatchedLedgerEntryRequest entry) throws InterruptedException - Throws:
InterruptedException
-