接口 OffloadIndexBlock
- 所有超级接口:
AutoCloseable,Closeable,OffloadIndexBlockV2
- 所有已知实现类:
OffloadIndexBlockImpl
The Index block abstraction used for offload a ledger to long term storage.
-
嵌套类概要
嵌套类修饰符和类型接口说明static classAn input stream which knows the size of the stream upfront. -
方法概要
修饰符和类型方法说明longGet the length of the header in the blocks in the data object.longGet the total size of the data object.intGet the entry count that contained in this index Block.getIndexEntryForEntry(long messageEntryId) Get the related OffloadIndexEntry that contains the given messageEntryId.default OffloadIndexEntrygetIndexEntryForEntry(long ledgerId, long messageEntryId) Get the related OffloadIndexEntry that contains the given messageEntryId.org.apache.bookkeeper.client.api.LedgerMetadataGet LedgerMetadata.default org.apache.bookkeeper.client.api.LedgerMetadatagetLedgerMetadata(long ledgerId) Get LedgerMetadata.default longgetStartEntryId(long ledgerId) toStream()Get the content of the index block as InputStream.
-
方法详细资料
-
toStream
Get the content of the index block as InputStream. Read out in format: | index_magic_header | index_block_len | index_entry_count | | data_object_size | segment_metadata_length | segment metadata | index entries ... |- 指定者:
toStream在接口中OffloadIndexBlockV2- 抛出:
IOException
-
getIndexEntryForEntry
Get the related OffloadIndexEntry that contains the given messageEntryId.- 参数:
messageEntryId- the entry id of message- 返回:
- the offload index entry
- 抛出:
IOException
-
getEntryCount
int getEntryCount()Get the entry count that contained in this index Block.- 指定者:
getEntryCount在接口中OffloadIndexBlockV2
-
getLedgerMetadata
org.apache.bookkeeper.client.api.LedgerMetadata getLedgerMetadata()Get LedgerMetadata. -
getDataObjectLength
long getDataObjectLength()Get the total size of the data object.- 指定者:
getDataObjectLength在接口中OffloadIndexBlockV2
-
getDataBlockHeaderLength
long getDataBlockHeaderLength()Get the length of the header in the blocks in the data object.- 指定者:
getDataBlockHeaderLength在接口中OffloadIndexBlockV2
-
getIndexEntryForEntry
default OffloadIndexEntry getIndexEntryForEntry(long ledgerId, long messageEntryId) throws IOException 从接口复制的说明:OffloadIndexBlockV2Get the related OffloadIndexEntry that contains the given messageEntryId.- 指定者:
getIndexEntryForEntry在接口中OffloadIndexBlockV2messageEntryId- the entry id of message- 返回:
- the offload index entry
- 抛出:
IOException
-
getStartEntryId
default long getStartEntryId(long ledgerId) - 指定者:
getStartEntryId在接口中OffloadIndexBlockV2
-
getLedgerMetadata
default org.apache.bookkeeper.client.api.LedgerMetadata getLedgerMetadata(long ledgerId) 从接口复制的说明:OffloadIndexBlockV2Get LedgerMetadata.- 指定者:
getLedgerMetadata在接口中OffloadIndexBlockV2- 返回:
-