OffHeapCache extends AbstractSearchableCache<K, V> { public boolean contains(K key) { return pointerMap.containsKey(key); } OffHeapCache(final String name, final CacheLoader<K, V> cacheLoader,
      final EvictionListener<K, V> evictionListener,
      final IndexHandler<K, V> indexHandler, final OffHeapByteBufferStore byteBufferStore,
      final Serializer<V> serializer,
      final long bufferCleanerPeriod, final float bufferCleanerThreshold,
      final int concurrencyLevel,
      final long evictionPeriod); void put(K key, V value); @Override void put(final K key, final V value, final TimeUnit timeUnit, final long duration); V get(K key); V invalidate(K key); boolean contains(K key); void clear(); @Override long size(); @Override CacheStats stats(); static final long DEFAULT_BUFFER_CLEANER_PERIOD; static final long DEFAULT_EVICTION_PERIOD; static final float DEFAULT_BUFFER_CLEANER_THRESHOLD; static final int DEFAULT_CONCURRENCY_LEVEL; }
@Test public void contains() { cache.put("a", "b"); assertTrue(cache.contains("a")); }