public class VersionSet extends Object implements SeekingIterable<InternalKey,Slice>
Modifier and Type | Field and Description |
---|---|
static long |
MAX_GRAND_PARENT_OVERLAP_BYTES |
static int |
TARGET_FILE_SIZE |
Constructor and Description |
---|
VersionSet(File databaseDir,
TableCache tableCache,
InternalKeyComparator internalKeyComparator) |
Modifier and Type | Method and Description |
---|---|
Compaction |
compactRange(int level,
InternalKey begin,
InternalKey end) |
void |
destroy() |
LookupResult |
get(LookupKey key) |
Version |
getCurrent() |
InternalKeyComparator |
getInternalKeyComparator() |
long |
getLastSequence() |
List<FileMetaData> |
getLiveFiles() |
long |
getLogNumber() |
long |
getManifestFileNumber() |
long |
getMaxNextLevelOverlappingBytes() |
long |
getNextFileNumber() |
long |
getPrevLogNumber() |
TableCache |
getTableCache() |
MergingIterator |
iterator() |
void |
logAndApply(VersionEdit edit) |
MergingIterator |
makeInputIterator(Compaction c) |
static long |
maxFileSizeForLevel(int level) |
boolean |
needsCompaction() |
long |
numberOfBytesInLevel(int level) |
int |
numberOfFilesInLevel(int level) |
boolean |
overlapInLevel(int level,
Slice smallestUserKey,
Slice largestUserKey) |
Compaction |
pickCompaction() |
void |
recover() |
void |
removeVersion(Version version) |
void |
setLastSequence(long newLastSequence) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static final int TARGET_FILE_SIZE
public static final long MAX_GRAND_PARENT_OVERLAP_BYTES
public VersionSet(File databaseDir, TableCache tableCache, InternalKeyComparator internalKeyComparator) throws IOException
IOException
public void destroy() throws IOException
IOException
public void removeVersion(Version version)
public InternalKeyComparator getInternalKeyComparator()
public TableCache getTableCache()
public Version getCurrent()
public long getManifestFileNumber()
public long getNextFileNumber()
public long getLogNumber()
public long getPrevLogNumber()
public MergingIterator iterator()
iterator
in interface Iterable<Map.Entry<InternalKey,Slice>>
iterator
in interface SeekingIterable<InternalKey,Slice>
public MergingIterator makeInputIterator(Compaction c)
public LookupResult get(LookupKey key)
public boolean overlapInLevel(int level, Slice smallestUserKey, Slice largestUserKey)
public int numberOfFilesInLevel(int level)
public long numberOfBytesInLevel(int level)
public long getLastSequence()
public void setLastSequence(long newLastSequence)
public void logAndApply(VersionEdit edit) throws IOException
IOException
public void recover() throws IOException
IOException
public List<FileMetaData> getLiveFiles()
public static long maxFileSizeForLevel(int level)
public boolean needsCompaction()
public Compaction compactRange(int level, InternalKey begin, InternalKey end)
public Compaction pickCompaction()
public long getMaxNextLevelOverlappingBytes()
Copyright © 2011–2019. All rights reserved.