/** {@inheritDoc} */
  @Nullable
  @Override
  public V put(K k, V v) {
    A.notNull(k, "k", v, "v");

    V ret = super.put(k, v);

    onPut();

    return ret;
  }
  /** {@inheritDoc} */
  @Nullable
  @Override
  public V putIfAbsent(K k, V v) {
    A.notNull(k, "k", v, "v");

    V ret = super.putIfAbsent(k, v);

    // Handle size only if put succeeded.
    if (ret == null) onPut();

    return ret;
  }
예제 #3
0
  /** {@inheritDoc} */
  @Override
  public GridFuture<?> addData(K key, V val) throws GridException, IllegalStateException {
    A.notNull(key, "key");

    return addData(new Entry0<>(key, val));
  }
예제 #4
0
  /** {@inheritDoc} */
  @Override
  public GridFuture<?> addData(Map.Entry<K, V> entry) throws GridException, IllegalStateException {
    A.notNull(entry, "entry");

    return addData(F.asList(entry));
  }
예제 #5
0
  /** {@inheritDoc} */
  @Override
  public GridFuture<?> addData(Map<K, V> entries) throws IllegalStateException {
    A.notNull(entries, "entries");

    return addData(entries.entrySet());
  }
예제 #6
0
  /** {@inheritDoc} */
  @Override
  public void updater(GridDataLoadCacheUpdater<K, V> updater) {
    A.notNull(updater, "updater");

    this.updater = updater;
  }