类 BlockAwareSegmentInputStreamImpl
java.lang.Object
java.io.InputStream
org.apache.bookkeeper.mledger.offload.jcloud.BlockAwareSegmentInputStream
org.apache.bookkeeper.mledger.offload.jcloud.impl.BlockAwareSegmentInputStreamImpl
- 所有已实现的接口:
Closeable,AutoCloseable
The BlockAwareSegmentInputStreamImpl for each cold storage data block.
It gets data from ledger, and will be read out the content for a data block.
DataBlockHeader + entries(each with format[[entry_size -- int][entry_id -- long][entry_data]]) + padding
-
构造器概要
构造器构造器说明BlockAwareSegmentInputStreamImpl(org.apache.bookkeeper.client.api.ReadHandle ledger, long startEntryId, int blockSize) -
方法概要
修饰符和类型方法说明static intcalculateBlockSize(int maxBlockSize, org.apache.bookkeeper.client.api.ReadHandle readHandle, long firstEntryToWrite, long entryBytesAlreadyWritten) voidclose()intGet sum of entries data size read from the this InputStream.intGet entry count that read out from this InputStream.intGet block size that could read out from this InputStream.intlongGet end entry id contained in this InputStream.static longorg.apache.bookkeeper.client.api.ReadHandleGet the ledger, from which this InputStream read data.longGet start entry id contained in this InputStream.intread()intread(byte[] b, int off, int len) 从类继承的方法 java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
构造器详细资料
-
BlockAwareSegmentInputStreamImpl
public BlockAwareSegmentInputStreamImpl(org.apache.bookkeeper.client.api.ReadHandle ledger, long startEntryId, int blockSize)
-
-
方法详细资料
-
read
- 覆盖:
read在类中InputStream- 抛出:
IOException
-
read
- 指定者:
read在类中InputStream- 抛出:
IOException
-
close
- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable- 覆盖:
close在类中InputStream- 抛出:
IOException
-
getLedger
public org.apache.bookkeeper.client.api.ReadHandle getLedger()从类复制的说明:BlockAwareSegmentInputStreamGet the ledger, from which this InputStream read data.- 指定者:
getLedger在类中BlockAwareSegmentInputStream
-
getStartEntryId
public long getStartEntryId()从类复制的说明:BlockAwareSegmentInputStreamGet start entry id contained in this InputStream.- 指定者:
getStartEntryId在类中BlockAwareSegmentInputStream- 返回:
- the start entry id
-
getBlockSize
public int getBlockSize()从类复制的说明:BlockAwareSegmentInputStreamGet block size that could read out from this InputStream.- 指定者:
getBlockSize在类中BlockAwareSegmentInputStream- 返回:
- the block size
-
getDataBlockFullOffset
public int getDataBlockFullOffset() -
getBlockEntryCount
public int getBlockEntryCount()从类复制的说明:BlockAwareSegmentInputStreamGet entry count that read out from this InputStream.- 指定者:
getBlockEntryCount在类中BlockAwareSegmentInputStream- 返回:
- the block entry count
-
getEndEntryId
public long getEndEntryId()从类复制的说明:BlockAwareSegmentInputStreamGet end entry id contained in this InputStream.- 指定者:
getEndEntryId在类中BlockAwareSegmentInputStream- 返回:
- the end entry id
-
getBlockEntryBytesCount
public int getBlockEntryBytesCount()从类复制的说明:BlockAwareSegmentInputStreamGet sum of entries data size read from the this InputStream.- 指定者:
getBlockEntryBytesCount在类中BlockAwareSegmentInputStream- 返回:
- the block entry bytes count
-
getHeaderSize
public static long getHeaderSize() -
calculateBlockSize
public static int calculateBlockSize(int maxBlockSize, org.apache.bookkeeper.client.api.ReadHandle readHandle, long firstEntryToWrite, long entryBytesAlreadyWritten)
-