Package org.apache.bookkeeper.mledger
Interface Entry
-
- All Known Implementing Classes:
EntryImpl
@LimitedPrivate @Stable public interface EntryAn Entry represent a ledger entry data and its associated position.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]getData()byte[]getDataAndRelease()io.netty.buffer.ByteBufgetDataBuffer()longgetEntryId()longgetLedgerId()intgetLength()PositiongetPosition()booleanrelease()Release the resources (data) allocated for this entry and recycle if all the resources are deallocated (ref-count of data reached to 0).
-
-
-
Method Detail
-
getData
byte[] getData()
- Returns:
- the data
-
getDataAndRelease
byte[] getDataAndRelease()
-
getLength
int getLength()
- Returns:
- the entry length in bytes
-
getDataBuffer
io.netty.buffer.ByteBuf getDataBuffer()
- Returns:
- the data buffer for the entry
-
getPosition
Position getPosition()
- Returns:
- the position at which the entry was stored
-
getLedgerId
long getLedgerId()
- Returns:
- ledgerId of the position
-
getEntryId
long getEntryId()
- Returns:
- entryId of the position
-
release
boolean release()
Release the resources (data) allocated for this entry and recycle if all the resources are deallocated (ref-count of data reached to 0).
-
-