public final class Table extends Object implements Closeable
| Constructor and Description |
|---|
Table(RandomInputFile source,
Comparator<Slice> comparator,
boolean paranoidChecks,
ILRUCache<CacheKey,Slice> blockCache,
FilterPolicy filterPolicy) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getApproximateOffsetOf(Slice key)
Given a key, return an approximate byte offset in the file where
the data for that key begins (or would begin if the key were
present in the file).
|
org.iq80.leveldb.table.FilterBlockReader |
getFilter() |
<T> T |
internalGet(ReadOptions options,
Slice key,
KeyValueFunction<T> keyValueFunction) |
SliceIterator |
iterator(ReadOptions options) |
Block |
openBlock(Slice blockEntry,
ReadOptions options) |
protected org.iq80.leveldb.table.FilterBlockReader |
readFilter(FilterPolicy filterPolicy,
Slice filterHandle,
boolean verifyChecksum) |
protected Slice |
readRawBlock(BlockHandle blockHandle,
boolean verifyChecksum) |
void |
release() |
boolean |
retain()
Try to retain current instance.
|
String |
toString() |
public Table(RandomInputFile source, Comparator<Slice> comparator, boolean paranoidChecks, ILRUCache<CacheKey,Slice> blockCache, FilterPolicy filterPolicy) throws IOException
IOExceptionprotected org.iq80.leveldb.table.FilterBlockReader readFilter(FilterPolicy filterPolicy, Slice filterHandle, boolean verifyChecksum) throws IOException
IOExceptionpublic SliceIterator iterator(ReadOptions options)
public org.iq80.leveldb.table.FilterBlockReader getFilter()
public Block openBlock(Slice blockEntry, ReadOptions options)
protected Slice readRawBlock(BlockHandle blockHandle, boolean verifyChecksum) throws IOException
IOExceptionpublic <T> T internalGet(ReadOptions options, Slice key, KeyValueFunction<T> keyValueFunction)
public long getApproximateOffsetOf(Slice key)
public boolean retain()
true if table was successfully retained, false otherwisepublic void release()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2011–2020. All rights reserved.