class OffHeapCache extends AbstractSearchableCache<K, V> {

  public V get(K key) {
    final Pointer pointer = pointerMap.get(key);
    if (pointer != null) {
      readLock(key);
      try {
        stats.incrementHitCount();
        final byte[] payload = bufferStore.retrieve(pointer);
        return serializer.deserialize(payload);
      } finally {
        readUnlock(key);
      }
    } else {
      stats.incrementMissCount();
      final V value = cacheLoader.load(key);
      if (value != null) {
        stats.incrementLoadCount();
        put(key, value);
      }
      return value;
    }
  }

  public  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);

}