@InterfaceStability.Unstable public interface OffloadIndexBlock extends Closeable, OffloadIndexBlockV2
| Modifier and Type | Interface and Description |
|---|---|
static class |
OffloadIndexBlock.IndexInputStream
An input stream which knows the size of the stream upfront.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
default OffloadIndexEntry |
getIndexEntryForEntry(long ledgerId,
long messageEntryId)
Get the related OffloadIndexEntry that contains the given messageEntryId.
|
org.apache.bookkeeper.client.api.LedgerMetadata |
getLedgerMetadata()
Get LedgerMetadata.
|
default org.apache.bookkeeper.client.api.LedgerMetadata |
getLedgerMetadata(long ledgerId)
Get LedgerMetadata.
|
default long |
getStartEntryId(long ledgerId) |
OffloadIndexBlock.IndexInputStream |
toStream()
Get the content of the index block as InputStream.
|
OffloadIndexBlock.IndexInputStream toStream() throws IOException
toStream in interface OffloadIndexBlockV2IOExceptionOffloadIndexEntry getIndexEntryForEntry(long messageEntryId) throws IOException
messageEntryId - the entry id of messageIOExceptionint getEntryCount()
getEntryCount in interface OffloadIndexBlockV2org.apache.bookkeeper.client.api.LedgerMetadata getLedgerMetadata()
long getDataObjectLength()
getDataObjectLength in interface OffloadIndexBlockV2long getDataBlockHeaderLength()
getDataBlockHeaderLength in interface OffloadIndexBlockV2default OffloadIndexEntry getIndexEntryForEntry(long ledgerId, long messageEntryId) throws IOException
OffloadIndexBlockV2getIndexEntryForEntry in interface OffloadIndexBlockV2messageEntryId - the entry id of messageIOExceptiondefault long getStartEntryId(long ledgerId)
getStartEntryId in interface OffloadIndexBlockV2default org.apache.bookkeeper.client.api.LedgerMetadata getLedgerMetadata(long ledgerId)
OffloadIndexBlockV2getLedgerMetadata in interface OffloadIndexBlockV2Copyright © 2017–2021 Apache Software Foundation. All rights reserved.