Package org.apache.bookkeeper.client
Class PendingWriteLacOp
java.lang.Object
org.apache.bookkeeper.client.PendingWriteLacOp
- All Implemented Interfaces:
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
FieldsModifier and TypeFieldDescription(package private) DistributionSchedule.AckSet(package private) AsyncCallback.AddLacCallback(package private) ClientContext(package private) boolean(package private) Object(package private) long(package private) int(package private) LedgerHandle(package private) BitSet(package private) ByteBufList -
Constructor Summary
ConstructorsConstructorDescriptionPendingWriteLacOp(LedgerHandle lh, ClientContext clientCtx, List<BookieId> ensemble, AsyncCallback.AddLacCallback cb, Object ctx) -
Method Summary
Modifier and TypeMethodDescription(package private) voidinitiate(ByteBufList toSend) (package private) voidsendWriteLacRequest(int bookieIndex) (package private) voidsetLac(long lac) voidwriteLacComplete(int rc, long ledgerId, BookieId addr, Object ctx)
-
Field Details
-
toSend
ByteBufList toSend -
cb
-
lac
long lac -
ctx
Object ctx -
receivedResponseSet
BitSet receivedResponseSet -
ackSet
DistributionSchedule.AckSet ackSet -
completed
boolean completed -
lastSeenError
int lastSeenError -
lh
LedgerHandle lh -
clientCtx
ClientContext clientCtx -
currentEnsemble
-
-
Constructor Details
-
PendingWriteLacOp
PendingWriteLacOp(LedgerHandle lh, ClientContext clientCtx, List<BookieId> ensemble, AsyncCallback.AddLacCallback cb, Object ctx)
-
-
Method Details
-
setLac
void setLac(long lac) -
sendWriteLacRequest
void sendWriteLacRequest(int bookieIndex) -
initiate
-
writeLacComplete
- Specified by:
writeLacCompletein interfaceBookkeeperInternalCallbacks.WriteLacCallback
-