/** {@inheritDoc} */
  @Override
  public V peek(K key, @Nullable GridPredicate<? super GridCacheEntry<K, V>>[] filter) {
    V val;

    try {
      val = peek0(true, key, SMART, filter);
    } catch (GridCacheFilterFailedException ignored) {
      if (log.isDebugEnabled()) log.debug("Filter validation failed for key: " + key);

      return null;
    }

    return val == null ? dht.peek(key, filter) : val;
  }
  /** {@inheritDoc} */
  @Override
  public V peek(K key, @Nullable Collection<GridCachePeekMode> modes) throws GridException {
    V val = null;

    if (!modes.contains(PARTITIONED_ONLY)) {
      try {
        val = peek0(true, key, modes, ctx.tm().txx());
      } catch (GridCacheFilterFailedException ignored) {
        if (log.isDebugEnabled()) log.debug("Filter validation failed for key: " + key);

        return null;
      }
    }

    return val == null && !modes.contains(NEAR_ONLY) ? dht.peek(key, modes) : val;
  }
 @Override
 public boolean apply(K k) {
   return dht.peek(k) != null;
 }