class AbstractSearchableCache extends AbstractCache<K, V> implements
    SearchableCache<K, V> {

  @SuppressWarnings("unchecked")
  public List<V> execute(Query query) {
    List<K> keys = indexHandler.execute(query);
    List<V> values = new ArrayList<V>(keys.size());
    for (K key : keys) {
      V value = get(key);
      if (value != null) {
        values.add(value);
      }
    }
    if (query.getFilter() != null) {
      values = (List<V>) query.getFilter().filter((List<Object>) values);
    }
    return values;
  }

  public  AbstractSearchableCache(final String name, final CacheLoader<K, V> cacheLoader,
      final EvictionListener<K, V> evictionListener,
      IndexHandler<K, V> indexHandler);

}