public class OffloadIndexBlockV2Impl extends Object implements OffloadIndexBlockV2
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static OffloadIndexBlockV2Impl |
get(int magic,
DataInputStream stream) |
static OffloadIndexBlockV2Impl |
get(Map<Long,MLDataFormats.ManagedLedgerInfo.LedgerInfo> metadata,
long dataObjectLength,
long dataHeaderLength,
Map<Long,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 ledgerId,
long messageEntryId)
Get the related OffloadIndexEntry that contains the given messageEntryId.
|
static int |
getIndexMagicWord() |
org.apache.bookkeeper.client.api.LedgerMetadata |
getLedgerMetadata(long ledgerId)
Get LedgerMetadata.
|
long |
getStartEntryId(long ledgerId) |
void |
recycle() |
OffloadIndexBlock.IndexInputStream |
toStream()
Get the content of the index block as InputStream.
|
public static OffloadIndexBlockV2Impl get(Map<Long,MLDataFormats.ManagedLedgerInfo.LedgerInfo> metadata, long dataObjectLength, long dataHeaderLength, Map<Long,List<OffloadIndexEntryImpl>> entries)
public static OffloadIndexBlockV2Impl get(int magic, DataInputStream stream) throws IOException
IOExceptionpublic void recycle()
public OffloadIndexEntry getIndexEntryForEntry(long ledgerId, long messageEntryId) throws IOException
OffloadIndexBlockV2getIndexEntryForEntry in interface OffloadIndexBlockV2messageEntryId - the entry id of messageIOExceptionpublic long getStartEntryId(long ledgerId)
getStartEntryId in interface OffloadIndexBlockV2public int getEntryCount()
OffloadIndexBlockV2getEntryCount in interface OffloadIndexBlockV2public org.apache.bookkeeper.client.api.LedgerMetadata getLedgerMetadata(long ledgerId)
OffloadIndexBlockV2getLedgerMetadata in interface OffloadIndexBlockV2public long getDataObjectLength()
OffloadIndexBlockV2getDataObjectLength in interface OffloadIndexBlockV2public long getDataBlockHeaderLength()
OffloadIndexBlockV2getDataBlockHeaderLength in interface OffloadIndexBlockV2public OffloadIndexBlock.IndexInputStream toStream() throws IOException
toStream in interface OffloadIndexBlockV2IOExceptionpublic static int getIndexMagicWord()
public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2017–2022 Apache Software Foundation. All rights reserved.