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 |
CacheMissMetrics |
metrics |
static int |
RESERVED_POOL_SPACE_IN_MB |
Constructor and Description |
---|
ChunkCache() |
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() |
RebuffererFactory |
wrap(ChunkReader file) |
public static final int RESERVED_POOL_SPACE_IN_MB
public static final long cacheSize
public static final ChunkCache instance
public final CacheMissMetrics metrics
public org.apache.cassandra.cache.ChunkCache.Buffer load(org.apache.cassandra.cache.ChunkCache.Key key) throws java.lang.Exception
load
in interface com.github.benmanes.caffeine.cache.CacheLoader<org.apache.cassandra.cache.ChunkCache.Key,org.apache.cassandra.cache.ChunkCache.Buffer>
java.lang.Exception
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 RebuffererFactory wrap(ChunkReader file)
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 © 2017 The Apache Software Foundation