public class OffloadIndexBlockImpl extends Object implements OffloadIndexBlock
OffloadIndexBlock.IndexInputStream| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static OffloadIndexBlockImpl |
get(int magic,
DataInputStream stream) |
static OffloadIndexBlockImpl |
get(org.apache.bookkeeper.client.api.LedgerMetadata metadata,
long dataObjectLength,
long dataHeaderLength,
List<OffloadIndexEntryImpl> entries) |
long |
getDataBlockHeaderLength()
Get the length of the header in the blocks in the data object.
|
long |
getDataObjectLength()
Get the total size of the data object.
|
int |
getEntryCount()
Get the entry count that contained in this index Block.
|
OffloadIndexEntry |
getIndexEntryForEntry(long messageEntryId)
Get the related OffloadIndexEntry that contains the given messageEntryId.
|
static int |
getIndexMagicWord() |
org.apache.bookkeeper.client.api.LedgerMetadata |
getLedgerMetadata()
Get LedgerMetadata.
|
void |
recycle() |
OffloadIndexBlock.IndexInputStream |
toStream()
Get the content of the index block as InputStream.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIndexEntryForEntry, getLedgerMetadata, getStartEntryIdpublic static OffloadIndexBlockImpl get(org.apache.bookkeeper.client.api.LedgerMetadata metadata, long dataObjectLength, long dataHeaderLength, List<OffloadIndexEntryImpl> entries)
public static OffloadIndexBlockImpl get(int magic, DataInputStream stream) throws IOException
IOExceptionpublic void recycle()
public OffloadIndexEntry getIndexEntryForEntry(long messageEntryId) throws IOException
OffloadIndexBlockgetIndexEntryForEntry in interface OffloadIndexBlockmessageEntryId - the entry id of messageIOExceptionpublic int getEntryCount()
OffloadIndexBlockgetEntryCount in interface OffloadIndexBlockgetEntryCount in interface OffloadIndexBlockV2public org.apache.bookkeeper.client.api.LedgerMetadata getLedgerMetadata()
OffloadIndexBlockgetLedgerMetadata in interface OffloadIndexBlockpublic long getDataObjectLength()
OffloadIndexBlockgetDataObjectLength in interface OffloadIndexBlockgetDataObjectLength in interface OffloadIndexBlockV2public long getDataBlockHeaderLength()
OffloadIndexBlockgetDataBlockHeaderLength in interface OffloadIndexBlockgetDataBlockHeaderLength in interface OffloadIndexBlockV2public OffloadIndexBlock.IndexInputStream toStream() throws IOException
toStream in interface OffloadIndexBlocktoStream in interface OffloadIndexBlockV2IOExceptionpublic static int getIndexMagicWord()
public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2017–2021 Apache Software Foundation. All rights reserved.