public boolean isKeyCacheEnabled() { return metadata.params.caching.cacheKeys() && CacheService.instance.keyCache.getCapacity() > 0; }
public boolean isCounterCacheEnabled() { return metadata.isCounter() && CacheService.instance.counterCache.getCapacity() > 0; }
public boolean isKeyCacheEnabled() { return metadata.params.caching.cacheKeys() && CacheService.instance.keyCache.getCapacity() > 0; }
public boolean isCounterCacheEnabled() { return metadata.isCounter() && CacheService.instance.counterCache.getCapacity() > 0; }
public boolean isRowCacheEnabled() { boolean retval = metadata.params.caching.cacheRows() && CacheService.instance.rowCache.getCapacity() > 0; assert(!retval || !isIndex()); return retval; }
public ClockAndCount getCachedCounter(ByteBuffer partitionKey, Clustering clustering, ColumnDefinition column, CellPath path) { if (CacheService.instance.counterCache.getCapacity() == 0L) // counter cache disabled. return null; return CacheService.instance.counterCache.get(CounterCacheKey.create(metadata.ksAndCFName, partitionKey, clustering, column, path)); }
/** * @return true if @param key is contained in the row cache */ public boolean containsCachedParition(DecoratedKey key) { return CacheService.instance.rowCache.getCapacity() != 0 && CacheService.instance.rowCache.containsKey(new RowCacheKey(metadata.ksAndCFName, key)); }
public boolean isRowCacheEnabled() { boolean retval = metadata.params.caching.cacheRows() && CacheService.instance.rowCache.getCapacity() > 0; assert(!retval || !isIndex()); return retval; }
/** * @return true if @param key is contained in the row cache */ public boolean containsCachedParition(DecoratedKey key) { return CacheService.instance.rowCache.getCapacity() != 0 && CacheService.instance.rowCache.containsKey(new RowCacheKey(metadata.ksAndCFName, key)); }
public void putCachedCounter(ByteBuffer partitionKey, CellName cellName, ClockAndCount clockAndCount) { if (CacheService.instance.counterCache.getCapacity() == 0L) // counter cache disabled. return; CacheService.instance.counterCache.put(CounterCacheKey.create(metadata.ksAndCFName, partitionKey, cellName), clockAndCount); }
public void putCachedCounter(ByteBuffer partitionKey, Clustering clustering, ColumnDefinition column, CellPath path, ClockAndCount clockAndCount) { if (CacheService.instance.counterCache.getCapacity() == 0L) // counter cache disabled. return; CacheService.instance.counterCache.put(CounterCacheKey.create(metadata.ksAndCFName, partitionKey, clustering, column, path), clockAndCount); }
public boolean isRowCacheEnabled() { boolean retval = metadata.params.caching.cacheRows() && CacheService.instance.rowCache.getCapacity() > 0; assert(!retval || !isIndex()); return retval; }
/** * @return true if @param key is contained in the row cache */ public boolean containsCachedRow(DecoratedKey key) { return CacheService.instance.rowCache.getCapacity() != 0 && CacheService.instance.rowCache.containsKey(new RowCacheKey(metadata.ksAndCFName, key)); }
public ClockAndCount getCachedCounter(ByteBuffer partitionKey, CellName cellName) { if (CacheService.instance.counterCache.getCapacity() == 0L) // counter cache disabled. return null; return CacheService.instance.counterCache.get(CounterCacheKey.create(metadata.ksAndCFName, partitionKey, cellName)); }
public void putCachedCounter(ByteBuffer partitionKey, Clustering clustering, ColumnDefinition column, CellPath path, ClockAndCount clockAndCount) { if (CacheService.instance.counterCache.getCapacity() == 0L) // counter cache disabled. return; CacheService.instance.counterCache.put(CounterCacheKey.create(metadata.ksAndCFName, partitionKey, clustering, column, path), clockAndCount); }
public ClockAndCount getCachedCounter(ByteBuffer partitionKey, Clustering clustering, ColumnDefinition column, CellPath path) { if (CacheService.instance.counterCache.getCapacity() == 0L) // counter cache disabled. return null; return CacheService.instance.counterCache.get(CounterCacheKey.create(metadata.ksAndCFName, partitionKey, clustering, column, path)); }
public void putCachedCounter(ByteBuffer partitionKey, Clustering clustering, ColumnDefinition column, CellPath path, ClockAndCount clockAndCount) { if (CacheService.instance.counterCache.getCapacity() == 0L) // counter cache disabled. return; CacheService.instance.counterCache.put(CounterCacheKey.create(metadata.ksAndCFName, partitionKey, clustering, column, path), clockAndCount); }
public boolean isRowCacheEnabled() { return metadata.getCaching().rowCache.isEnabled() && CacheService.instance.rowCache.getCapacity() > 0; }
/** * @return true if @param key is contained in the row cache */ public boolean containsCachedParition(DecoratedKey key) { return CacheService.instance.rowCache.getCapacity() != 0 && CacheService.instance.rowCache.containsKey(new RowCacheKey(metadata.ksAndCFName, key)); }
private void updateCounterCache(Mutation applied, Keyspace keyspace) { if (CacheService.instance.counterCache.getCapacity() == 0) return; for (ColumnFamily cf : applied.getColumnFamilies()) { ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(cf.id()); for (Cell cell : cf) if (cell instanceof CounterCell) cfs.putCachedCounter(key(), cell.name(), CounterContext.instance().getLocalClockAndCount(cell.value())); } }