Package org.apache.bookkeeper.client
Class PendingWriteLacOp
- java.lang.Object
-
- org.apache.bookkeeper.client.PendingWriteLacOp
-
- All Implemented Interfaces:
BookkeeperInternalCallbacks.WriteLacCallback
class PendingWriteLacOp extends java.lang.Object implements BookkeeperInternalCallbacks.WriteLacCallback
This represents a pending WriteLac operation. When it has got success from Ack Quorum bookies, sends success back to the application, otherwise failure is sent back to the caller.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.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) DistributionSchedule.AckSetackSet(package private) AsyncCallback.AddLacCallbackcb(package private) ClientContextclientCtx(package private) booleancompleted(package private) java.lang.Objectctx(package private) java.util.List<BookieId>currentEnsemble(package private) longlac(package private) intlastSeenError(package private) LedgerHandlelh(package private) java.util.BitSetreceivedResponseSet(package private) ByteBufListtoSend
-
Constructor Summary
Constructors Constructor Description PendingWriteLacOp(LedgerHandle lh, ClientContext clientCtx, java.util.List<BookieId> ensemble, AsyncCallback.AddLacCallback cb, java.lang.Object ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidinitiate(ByteBufList toSend)(package private) voidsendWriteLacRequest(int bookieIndex)(package private) voidsetLac(long lac)voidwriteLacComplete(int rc, long ledgerId, BookieId addr, java.lang.Object ctx)
-
-
-
Field Detail
-
toSend
ByteBufList toSend
-
lac
long lac
-
ctx
java.lang.Object ctx
-
receivedResponseSet
java.util.BitSet receivedResponseSet
-
ackSet
DistributionSchedule.AckSet ackSet
-
completed
boolean completed
-
lastSeenError
int lastSeenError
-
lh
LedgerHandle lh
-
clientCtx
ClientContext clientCtx
-
currentEnsemble
final java.util.List<BookieId> currentEnsemble
-
-
Constructor Detail
-
PendingWriteLacOp
PendingWriteLacOp(LedgerHandle lh, ClientContext clientCtx, java.util.List<BookieId> ensemble, AsyncCallback.AddLacCallback cb, java.lang.Object ctx)
-
-
Method Detail
-
setLac
void setLac(long lac)
-
sendWriteLacRequest
void sendWriteLacRequest(int bookieIndex)
-
initiate
void initiate(ByteBufList toSend)
-
writeLacComplete
public void writeLacComplete(int rc, long ledgerId, BookieId addr, java.lang.Object ctx)- Specified by:
writeLacCompletein interfaceBookkeeperInternalCallbacks.WriteLacCallback
-
-