public class ChunkCache extends java.lang.Object implements com.github.benmanes.caffeine.cache.CacheLoader<org.apache.cassandra.cache.ChunkCache.Key,org.apache.cassandra.cache.ChunkCache.Buffer>, com.github.benmanes.caffeine.cache.RemovalListener<org.apache.cassandra.cache.ChunkCache.Key,org.apache.cassandra.cache.ChunkCache.Buffer>, CacheSize
Modifier and Type | Field and Description |
---|---|
static long |
cacheSize |
static ChunkCache |
instance |
ChunkCacheMetrics |
metrics |
static int |
RESERVED_POOL_SPACE_IN_MB |
static boolean |
roundUp |
Modifier and Type | Method and Description |
---|---|
long |
capacity() |
void |
close() |
void |
enable(boolean enabled) |
void |
invalidateFile(java.lang.String fileName) |
void |
invalidatePosition(FileHandle dfile,
long position) |
org.apache.cassandra.cache.ChunkCache.Buffer |
load(org.apache.cassandra.cache.ChunkCache.Key key) |
static RebuffererFactory |
maybeWrap(ChunkReader file) |
void |
onRemoval(org.apache.cassandra.cache.ChunkCache.Key key,
org.apache.cassandra.cache.ChunkCache.Buffer buffer,
com.github.benmanes.caffeine.cache.RemovalCause cause) |
void |
setCapacity(long capacity) |
int |
size() |
long |
weightedSize() |
public static final int RESERVED_POOL_SPACE_IN_MB
public static final long cacheSize
public static final boolean roundUp
public static final ChunkCache instance
public final ChunkCacheMetrics metrics
public org.apache.cassandra.cache.ChunkCache.Buffer load(org.apache.cassandra.cache.ChunkCache.Key key)
load
in interface com.github.benmanes.caffeine.cache.CacheLoader<org.apache.cassandra.cache.ChunkCache.Key,org.apache.cassandra.cache.ChunkCache.Buffer>
public void onRemoval(org.apache.cassandra.cache.ChunkCache.Key key, org.apache.cassandra.cache.ChunkCache.Buffer buffer, com.github.benmanes.caffeine.cache.RemovalCause cause)
onRemoval
in interface com.github.benmanes.caffeine.cache.RemovalListener<org.apache.cassandra.cache.ChunkCache.Key,org.apache.cassandra.cache.ChunkCache.Buffer>
public void close()
public static RebuffererFactory maybeWrap(ChunkReader file)
public void invalidatePosition(FileHandle dfile, long position)
public void invalidateFile(java.lang.String fileName)
public void enable(boolean enabled)
public void setCapacity(long capacity)
setCapacity
in interface CacheSize
public long weightedSize()
weightedSize
in interface CacheSize
Copyright © 2009-2021 The Apache Software Foundation