class PendingReadLacOp
extends java.lang.Object
implements org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.ReadLacCallback
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.
| Modifier and Type | Class and Description |
|---|---|
(package private) static interface |
PendingReadLacOp.LacCallback |
| Modifier and Type | Field and Description |
|---|---|
(package private) org.apache.bookkeeper.proto.BookieClient |
bookieClient |
(package private) PendingReadLacOp.LacCallback |
cb |
(package private) boolean |
completed |
(package private) DistributionSchedule.QuorumCoverageSet |
coverageSet |
(package private) java.util.List<org.apache.bookkeeper.net.BookieId> |
currentEnsemble |
(package private) int |
lastSeenError |
(package private) LedgerHandle |
lh |
(package private) static org.slf4j.Logger |
LOG |
(package private) long |
maxLac |
(package private) int |
numResponsesPending |
| Constructor and Description |
|---|
PendingReadLacOp(LedgerHandle lh,
org.apache.bookkeeper.proto.BookieClient bookieClient,
java.util.List<org.apache.bookkeeper.net.BookieId> ensemble,
PendingReadLacOp.LacCallback cb) |
| Modifier and Type | Method and Description |
|---|---|
void |
initiate() |
void |
readLacComplete(int rc,
long ledgerId,
io.netty.buffer.ByteBuf lacBuffer,
io.netty.buffer.ByteBuf lastEntryBuffer,
java.lang.Object ctx) |
static final org.slf4j.Logger LOG
LedgerHandle lh
org.apache.bookkeeper.proto.BookieClient bookieClient
int numResponsesPending
volatile boolean completed
int lastSeenError
final DistributionSchedule.QuorumCoverageSet coverageSet
long maxLac
final java.util.List<org.apache.bookkeeper.net.BookieId> currentEnsemble
PendingReadLacOp(LedgerHandle lh, org.apache.bookkeeper.proto.BookieClient bookieClient, java.util.List<org.apache.bookkeeper.net.BookieId> ensemble, PendingReadLacOp.LacCallback cb)
public void initiate()
public void readLacComplete(int rc,
long ledgerId,
io.netty.buffer.ByteBuf lacBuffer,
io.netty.buffer.ByteBuf lastEntryBuffer,
java.lang.Object ctx)
readLacComplete in interface org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.ReadLacCallbackCopyright © 2011–2024 The Apache Software Foundation. All rights reserved.