Class OpAddEntry
java.lang.Object
org.apache.bookkeeper.mledger.impl.OpAddEntry
- All Implemented Interfaces:
Runnable,AsyncCallback.AddCallback,AsyncCallback.AddCallbackWithLatency,AsyncCallback.CloseCallback
public class OpAddEntry
extends Object
implements AsyncCallback.AddCallback, AsyncCallback.CloseCallback, Runnable
Handles the life-cycle of an addEntry() operation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AsyncCallbacks.AddEntryCallbackprotected ManagedLedgerImpl -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComplete(int rc, LedgerHandle lh, long entryId, Object ctx) voidcloseComplete(int rc, LedgerHandle lh, Object ctx) static OpAddEntrycreateNoRetainBuffer(ManagedLedgerImpl ml, io.netty.buffer.ByteBuf data, int numberOfMessages, AsyncCallbacks.AddEntryCallback callback, Object ctx) static OpAddEntrycreateNoRetainBuffer(ManagedLedgerImpl ml, io.netty.buffer.ByteBuf data, AsyncCallbacks.AddEntryCallback callback, Object ctx) voidgetCtx()io.netty.buffer.ByteBufgetData()intorg.apache.bookkeeper.mledger.impl.OpAddEntry.StategetState()voidinitiate()voidvoidrecycle()voidrun()voidsetCloseWhenDone(boolean closeWhenDone) voidsetData(io.netty.buffer.ByteBuf data) voidsetLedger(LedgerHandle ledger) voidsetNumberOfMessages(int numberOfMessages) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.bookkeeper.client.AsyncCallback.AddCallback
addCompleteWithLatency
-
Field Details
-
ml
-
callback
-
-
Method Details
-
createNoRetainBuffer
public static OpAddEntry createNoRetainBuffer(ManagedLedgerImpl ml, io.netty.buffer.ByteBuf data, AsyncCallbacks.AddEntryCallback callback, Object ctx) -
createNoRetainBuffer
public static OpAddEntry createNoRetainBuffer(ManagedLedgerImpl ml, io.netty.buffer.ByteBuf data, int numberOfMessages, AsyncCallbacks.AddEntryCallback callback, Object ctx) -
setLedger
-
setCloseWhenDone
public void setCloseWhenDone(boolean closeWhenDone) -
initiate
public void initiate() -
initiateShadowWrite
public void initiateShadowWrite() -
failed
-
addComplete
- Specified by:
addCompletein interfaceAsyncCallback.AddCallback
-
run
public void run() -
closeComplete
- Specified by:
closeCompletein interfaceAsyncCallback.CloseCallback
-
getState
public org.apache.bookkeeper.mledger.impl.OpAddEntry.State getState() -
getData
public io.netty.buffer.ByteBuf getData() -
getNumberOfMessages
public int getNumberOfMessages() -
getCtx
-
setNumberOfMessages
public void setNumberOfMessages(int numberOfMessages) -
setData
public void setData(io.netty.buffer.ByteBuf data) -
recycle
public void recycle() -
toString
-