Class EntryImpl
java.lang.Object
org.apache.bookkeeper.mledger.util.AbstractCASReferenceCounted
org.apache.bookkeeper.mledger.impl.EntryImpl
- All Implemented Interfaces:
io.netty.util.ReferenceCounted,Comparable<EntryImpl>,Entry
public final class EntryImpl
extends AbstractCASReferenceCounted
implements Entry, Comparable<EntryImpl>, io.netty.util.ReferenceCounted
-
Method Summary
Modifier and TypeMethodDescriptionintstatic EntryImplcreate(long ledgerId, long entryId, byte[] data) static EntryImplcreate(long ledgerId, long entryId, io.netty.buffer.ByteBuf data) static EntryImplcreate(org.apache.bookkeeper.client.api.LedgerEntry ledgerEntry) static EntryImplstatic EntryImplcreate(PositionImpl position, io.netty.buffer.ByteBuf data) protected voidCalled onceAbstractCASReferenceCounted.refCnt()is equals 0.byte[]getData()byte[]io.netty.buffer.ByteBuflonglongintlongvoidio.netty.util.ReferenceCountedMethods inherited from class org.apache.bookkeeper.mledger.util.AbstractCASReferenceCounted
refCnt, release, release, retain, retain, setRefCnt, touchMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.util.ReferenceCounted
refCnt, release, release, retain, retain, touch
-
Method Details
-
create
-
create
-
create
-
create
-
create
-
onDeallocate
-
getTimestamp
public long getTimestamp() -
getDataBuffer
public io.netty.buffer.ByteBuf getDataBuffer()- Specified by:
getDataBufferin interfaceEntry- Returns:
- the data buffer for the entry
-
getData
public byte[] getData() -
getDataAndRelease
public byte[] getDataAndRelease()- Specified by:
getDataAndReleasein interfaceEntry
-
getLength
public int getLength() -
getPosition
- Specified by:
getPositionin interfaceEntry- Returns:
- the position at which the entry was stored
-
getLedgerId
public long getLedgerId()- Specified by:
getLedgerIdin interfaceEntry- Returns:
- ledgerId of the position
-
getEntryId
public long getEntryId()- Specified by:
getEntryIdin interfaceEntry- Returns:
- entryId of the position
-
compareTo
- Specified by:
compareToin interfaceComparable<EntryImpl>
-
touch
- Specified by:
touchin interfaceio.netty.util.ReferenceCounted
-
deallocate
protected void deallocate()Description copied from class:AbstractCASReferenceCountedCalled onceAbstractCASReferenceCounted.refCnt()is equals 0.- Specified by:
deallocatein classAbstractCASReferenceCounted
-