Class KeyCache
- java.lang.Object
-
- org.apache.cassandra.io.sstable.keycache.KeyCache
-
public class KeyCache extends java.lang.Object
A simple wrapper of possibly global cache with local metrics.
-
-
Constructor Summary
Constructors Constructor Description KeyCache(InstrumentingCache<KeyCacheKey,AbstractRowIndexEntry> cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractRowIndexEntry
get(KeyCacheKey key, boolean updateStats)
long
getHits()
long
getRequests()
boolean
isEnabled()
void
put(KeyCacheKey cacheKey, AbstractRowIndexEntry info)
-
-
-
Field Detail
-
NO_CACHE
public static final KeyCache NO_CACHE
-
-
Constructor Detail
-
KeyCache
public KeyCache(@Nullable InstrumentingCache<KeyCacheKey,AbstractRowIndexEntry> cache)
-
-
Method Detail
-
getHits
public long getHits()
-
getRequests
public long getRequests()
-
put
public void put(@Nonnull KeyCacheKey cacheKey, @Nonnull AbstractRowIndexEntry info)
-
get
@Nullable public AbstractRowIndexEntry get(KeyCacheKey key, boolean updateStats)
-
isEnabled
public boolean isEnabled()
-
-