Package org.apache.bookkeeper.client
Class PendingReadLacOp
- java.lang.Object
- 
- org.apache.bookkeeper.client.PendingReadLacOp
 
- 
- All Implemented Interfaces:
- BookkeeperInternalCallbacks.ReadLacCallback
 
 class PendingReadLacOp extends java.lang.Object implements BookkeeperInternalCallbacks.ReadLacCallback This represents a pending ReadLac operation.LAC is stored in two places on bookies. 1. WriteLac operation sends Explicit LAC and is stored in memory on each bookie. 2. Each AddEntry operation piggy-backs LAC which is stored on bookie's disk. This operation returns both of those entries and we pick the latest LAC out of available answers. This is an optional protocol operations to facilitate tailing readers to be up to date with the writer. This is best effort to get latest LAC from bookies, and doesn't affect the correctness of the protocol. 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description (package private) static interfacePendingReadLacOp.LacCallback
 - 
Field SummaryFields Modifier and Type Field Description (package private) BookieClientbookieClient(package private) PendingReadLacOp.LacCallbackcb(package private) booleancompleted(package private) DistributionSchedule.QuorumCoverageSetcoverageSet(package private) java.util.List<BookieId>currentEnsemble(package private) intlastSeenError(package private) LedgerHandlelh(package private) static org.slf4j.LoggerLOG(package private) longmaxLac(package private) intnumResponsesPending
 - 
Constructor SummaryConstructors Constructor Description PendingReadLacOp(LedgerHandle lh, BookieClient bookieClient, java.util.List<BookieId> ensemble, PendingReadLacOp.LacCallback cb)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitiate()voidreadLacComplete(int rc, long ledgerId, io.netty.buffer.ByteBuf lacBuffer, io.netty.buffer.ByteBuf lastEntryBuffer, java.lang.Object ctx)
 
- 
- 
- 
Field Detail- 
LOGstatic final org.slf4j.Logger LOG 
 - 
lhLedgerHandle lh 
 - 
bookieClientBookieClient bookieClient 
 - 
numResponsesPendingint numResponsesPending 
 - 
completedvolatile boolean completed 
 - 
lastSeenErrorint lastSeenError 
 - 
coverageSetfinal DistributionSchedule.QuorumCoverageSet coverageSet 
 - 
maxLaclong maxLac 
 - 
currentEnsemblefinal java.util.List<BookieId> currentEnsemble 
 
- 
 - 
Constructor Detail- 
PendingReadLacOpPendingReadLacOp(LedgerHandle lh, BookieClient bookieClient, java.util.List<BookieId> ensemble, PendingReadLacOp.LacCallback cb) 
 
- 
 - 
Method Detail- 
initiatepublic void initiate() 
 - 
readLacCompletepublic void readLacComplete(int rc, long ledgerId, io.netty.buffer.ByteBuf lacBuffer, io.netty.buffer.ByteBuf lastEntryBuffer, java.lang.Object ctx)- Specified by:
- readLacCompletein interface- BookkeeperInternalCallbacks.ReadLacCallback
 
 
- 
 
-