Package org.apache.bookkeeper.client
Class PendingReadLacOp
java.lang.Object
org.apache.bookkeeper.client.PendingReadLacOp
- All Implemented Interfaces:
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 Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) BookieClient(package private) PendingReadLacOp.LacCallback(package private) boolean(package private) final DistributionSchedule.QuorumCoverageSet(package private) int(package private) LedgerHandle(package private) static final org.slf4j.Logger(package private) long(package private) int -
Constructor Summary
ConstructorsConstructorDescriptionPendingReadLacOp(LedgerHandle lh, BookieClient bookieClient, List<BookieId> ensemble, PendingReadLacOp.LacCallback cb) -
Method Summary
Modifier and TypeMethodDescriptionvoidinitiate()voidreadLacComplete(int rc, long ledgerId, io.netty.buffer.ByteBuf lacBuffer, io.netty.buffer.ByteBuf lastEntryBuffer, Object ctx)
-
Field Details
-
LOG
static final org.slf4j.Logger LOG -
lh
LedgerHandle lh -
bookieClient
BookieClient bookieClient -
cb
-
numResponsesPending
int numResponsesPending -
completed
volatile boolean completed -
lastSeenError
int lastSeenError -
coverageSet
-
maxLac
long maxLac -
currentEnsemble
-
-
Constructor Details
-
PendingReadLacOp
PendingReadLacOp(LedgerHandle lh, BookieClient bookieClient, List<BookieId> ensemble, PendingReadLacOp.LacCallback cb)
-
-
Method Details
-
initiate
public void initiate() -
readLacComplete
public void readLacComplete(int rc, long ledgerId, io.netty.buffer.ByteBuf lacBuffer, io.netty.buffer.ByteBuf lastEntryBuffer, Object ctx) - Specified by:
readLacCompletein interfaceBookkeeperInternalCallbacks.ReadLacCallback
-