K - the type of keys maintained by this cacheV - the type of cached valuespublic final class StandalonePersistentRecordCache<K,V> extends Object implements RecordCache<K,V>
V value in the underlying cache directly. This contrasts with
PersistentRecordCache, which creates an underlying cache
of key to (segment number of the recordLog file where the value is located) and then looks up the
value in the relevant recordLog file using the segment number.
NOTE: Since the dataset will occasionally double in size during compaction, this class is only
recommended for use on recordLog datasets of under ~100GB.| Modifier and Type | Class and Description |
|---|---|
static class |
StandalonePersistentRecordCache.Builder<K,V> |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
V |
get(K key,
CacheStats cacheStats) |
Map<K,V> |
getAll(Collection<K> keys,
CacheStats cacheStats) |
RecordLogDirectoryPoller.Functions |
getFunctions() |
long |
getIndexActiveSpaceUsage() |
long |
getIndexFreeSpace() |
long |
getIndexReservedSpaceUsage() |
long |
getIndexTotalSpaceUsage() |
Iterator<com.indeed.util.core.Either<Exception,fj.P2<K,V>>> |
getStreaming(Iterator<K> keys,
AtomicInteger progress,
AtomicInteger skipped) |
void |
waitForCompactions() |
public long getIndexActiveSpaceUsage()
throws IOException
IOExceptionpublic long getIndexTotalSpaceUsage()
throws IOException
IOExceptionpublic long getIndexReservedSpaceUsage()
public long getIndexFreeSpace()
throws IOException
IOExceptionpublic V get(K key, CacheStats cacheStats)
get in interface RecordCache<K,V>public Map<K,V> getAll(Collection<K> keys, CacheStats cacheStats)
getAll in interface RecordCache<K,V>public Iterator<com.indeed.util.core.Either<Exception,fj.P2<K,V>>> getStreaming(Iterator<K> keys, AtomicInteger progress, AtomicInteger skipped)
public RecordLogDirectoryPoller.Functions getFunctions()
getFunctions in interface RecordCache<K,V>public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void waitForCompactions()
throws InterruptedException
InterruptedExceptionCopyright © 2017. All Rights Reserved.