类 OpAddEntry
java.lang.Object
org.apache.bookkeeper.util.SafeRunnable
org.apache.bookkeeper.mledger.impl.OpAddEntry
- 所有已实现的接口:
Runnable,org.apache.bookkeeper.client.AsyncCallback.AddCallback,org.apache.bookkeeper.client.AsyncCallback.AddCallbackWithLatency,org.apache.bookkeeper.client.AsyncCallback.CloseCallback,org.apache.bookkeeper.common.util.SafeRunnable
public class OpAddEntry
extends org.apache.bookkeeper.util.SafeRunnable
implements org.apache.bookkeeper.client.AsyncCallback.AddCallback, org.apache.bookkeeper.client.AsyncCallback.CloseCallback
Handles the life-cycle of an addEntry() operation.
-
字段概要
字段从接口继承的字段 org.apache.bookkeeper.common.util.SafeRunnable
LOGGER -
方法概要
修饰符和类型方法说明voidaddComplete(int rc, org.apache.bookkeeper.client.LedgerHandle lh, long entryId, Object ctx) voidcloseComplete(int rc, org.apache.bookkeeper.client.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()voidrecycle()voidsafeRun()voidsetCloseWhenDone(boolean closeWhenDone) voidsetData(io.netty.buffer.ByteBuf data) voidsetLedger(org.apache.bookkeeper.client.LedgerHandle ledger) voidsetNumberOfMessages(int numberOfMessages) toString()从类继承的方法 org.apache.bookkeeper.util.SafeRunnable
safeRun, safeRun从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 org.apache.bookkeeper.client.AsyncCallback.AddCallback
addCompleteWithLatency从接口继承的方法 org.apache.bookkeeper.common.util.SafeRunnable
run
-
字段详细资料
-
ml
-
callback
-
-
方法详细资料
-
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
public void setLedger(org.apache.bookkeeper.client.LedgerHandle ledger) -
setCloseWhenDone
public void setCloseWhenDone(boolean closeWhenDone) -
initiate
public void initiate() -
failed
-
addComplete
public void addComplete(int rc, org.apache.bookkeeper.client.LedgerHandle lh, long entryId, Object ctx) - 指定者:
addComplete在接口中org.apache.bookkeeper.client.AsyncCallback.AddCallback
-
safeRun
public void safeRun()- 指定者:
safeRun在接口中org.apache.bookkeeper.common.util.SafeRunnable
-
closeComplete
- 指定者:
closeComplete在接口中org.apache.bookkeeper.client.AsyncCallback.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
-