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) class
BatchedReadOp.BatchedLedgerEntryRequest
(package private) class
BatchedReadOp.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) int
maxCount
(package private) long
maxSize
(package private) BatchedReadOp.BatchedLedgerEntryRequest
request
-
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) void
initiate()
void
readEntriesComplete(int rc, long ledgerId, long startEntryId, ByteBufList bufList, java.lang.Object ctx)
(package private) void
sendReadTo(int bookieIndex, BookieId to, BatchedReadOp.BatchedLedgerEntryRequest entry)
protected void
submitCallback(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:
initiate
in classReadOpBase
-
submitCallback
protected void submitCallback(int code)
- Specified by:
submitCallback
in classReadOpBase
-
readEntriesComplete
public void readEntriesComplete(int rc, long ledgerId, long startEntryId, ByteBufList bufList, java.lang.Object ctx)
- Specified by:
readEntriesComplete
in interfaceBookkeeperInternalCallbacks.BatchedReadEntryCallback
-
sendReadTo
void sendReadTo(int bookieIndex, BookieId to, BatchedReadOp.BatchedLedgerEntryRequest entry) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
-