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.AckSet
ackSet
(package private) AsyncCallback.AddLacCallback
cb
(package private) ClientContext
clientCtx
(package private) boolean
completed
(package private) java.lang.Object
ctx
(package private) java.util.List<BookieId>
currentEnsemble
(package private) long
lac
(package private) int
lastSeenError
(package private) LedgerHandle
lh
(package private) java.util.BitSet
receivedResponseSet
(package private) ByteBufList
toSend
-
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) void
initiate(ByteBufList toSend)
(package private) void
sendWriteLacRequest(int bookieIndex)
(package private) void
setLac(long lac)
void
writeLacComplete(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:
writeLacComplete
in interfaceBookkeeperInternalCallbacks.WriteLacCallback
-
-