public class BlockAwareSegmentInputStreamImpl extends BlockAwareSegmentInputStream
| Constructor and Description |
|---|
BlockAwareSegmentInputStreamImpl(org.apache.bookkeeper.client.api.ReadHandle ledger,
long startEntryId,
int blockSize) |
| Modifier and Type | Method and Description |
|---|---|
static int |
calculateBlockSize(int maxBlockSize,
org.apache.bookkeeper.client.api.ReadHandle readHandle,
long firstEntryToWrite,
long entryBytesAlreadyWritten) |
void |
close() |
int |
getBlockEntryBytesCount()
Get sum of entries data size read from the this InputStream.
|
int |
getBlockEntryCount()
Get entry count that read out from this InputStream.
|
int |
getBlockSize()
Get block size that could read out from this InputStream.
|
long |
getEndEntryId()
Get end entry id contained in this InputStream.
|
static long |
getHeaderSize() |
org.apache.bookkeeper.client.api.ReadHandle |
getLedger()
Get the ledger, from which this InputStream read data.
|
long |
getStartEntryId()
Get start entry id contained in this InputStream.
|
int |
read() |
available, mark, markSupported, read, read, reset, skippublic BlockAwareSegmentInputStreamImpl(org.apache.bookkeeper.client.api.ReadHandle ledger, long startEntryId, int blockSize)
public int read()
throws IOException
read in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic org.apache.bookkeeper.client.api.ReadHandle getLedger()
BlockAwareSegmentInputStreamgetLedger in class BlockAwareSegmentInputStreampublic long getStartEntryId()
BlockAwareSegmentInputStreamgetStartEntryId in class BlockAwareSegmentInputStreampublic int getBlockSize()
BlockAwareSegmentInputStreamgetBlockSize in class BlockAwareSegmentInputStreampublic int getBlockEntryCount()
BlockAwareSegmentInputStreamgetBlockEntryCount in class BlockAwareSegmentInputStreampublic long getEndEntryId()
BlockAwareSegmentInputStreamgetEndEntryId in class BlockAwareSegmentInputStreampublic int getBlockEntryBytesCount()
BlockAwareSegmentInputStreamgetBlockEntryBytesCount in class BlockAwareSegmentInputStreampublic static long getHeaderSize()
public static int calculateBlockSize(int maxBlockSize,
org.apache.bookkeeper.client.api.ReadHandle readHandle,
long firstEntryToWrite,
long entryBytesAlreadyWritten)
Copyright © 2017–2022 Apache Software Foundation. All rights reserved.