コード例 #1
0
  /**
   * @param entry Entry.
   * @param bound Value bound.
   * @throws Exception If failed.
   */
  private void checkEntry(GridCacheEntry<String, Integer> entry, int bound) throws Exception {
    assert entry != null;

    checkKey(entry.getKey());
    checkValue(entry.getValue(), bound);
    checkValue(entry.get(), bound);
  }
コード例 #2
0
    /** {@inheritDoc} */
    @Override
    public void remove() {
      if (currEntry == null) throw new IllegalStateException();

      assert currIter != null;

      currIter.remove();

      try {
        GridNearCache.this.remove(currEntry.getKey(), CU.<K, V>empty());
      } catch (GridException e) {
        throw new GridRuntimeException(e);
      }
    }
コード例 #3
0
  /** {@inheritDoc} */
  @Override
  public boolean evictAllowed(GridCacheEntry entry) {
    Object key = entry.getKey();

    return !(key instanceof GridGgfsBlockKey && ((GridGgfsBlockKey) key).evictExclude());
  }