class OffHeapCache extends AbstractSearchableCache<K, V> {

  public V invalidate(K key) {
    writeLock(key);
    try {
      final Pointer pointer = pointerMap.get(key);
      if (pointer != null) {
        final byte[] payload = bufferStore.remove(pointer);
        pointerMap.remove(key);
        final V value = serializer.deserialize(payload);
        indexHandler.remove(key, value);
        return value;
      }
    } finally {
      writeUnlock(key);
    }
    return null;
  }

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

}