@Override @Timed("ninja.cache.get") public Object get(String key) { Object result = underlyingCache.get(key); if (result == null) { missCounter.inc(); } else { hitCounter.inc(); } return result; }
@Override @Timed("ninja.cache.getMany") public Map<String, Object> get(String[] keys) { Map<String, Object> result = underlyingCache.get(keys); if (result == null || result.isEmpty()) { missCounter.inc(keys.length); } else { hitCounter.inc(result.size()); missCounter.inc(keys.length - result.size()); } return result; }
@Override @Timed("ninja.cache.replace") public void replace(String key, Object value, int expiration) { underlyingCache.replace(key, value, expiration); }
@Override @Timed("ninja.cache.safeReplace") public boolean safeReplace(String key, Object value, int expiration) { return underlyingCache.safeReplace(key, value, expiration); }
@Override @Timed("ninja.cache.set") public void set(String key, Object value, int expiration) { underlyingCache.set(key, value, expiration); }
@Override @Timed("ninja.cache.safeDelete") public boolean safeDelete(String key) { return underlyingCache.safeDelete(key); }
@Override @Timed("ninja.cache.delete") public void delete(String key) { underlyingCache.delete(key); }
@Override @Timed("ninja.cache.clear") public void clear() { underlyingCache.clear(); }
@Override @Timed("ninja.cache.decr") public long decr(String key, int by) { return underlyingCache.decr(key, by); }