Exemplo n.º 1
0
  /** {@inheritDoc} */
  @Override
  public void isolated(boolean isolated) throws GridException {
    if (isolated()) return;

    GridNode node = F.first(ctx.grid().forCache(cacheName).nodes());

    if (node == null) throw new GridException("Failed to get node for cache: " + cacheName);

    GridCacheAttributes a = U.cacheAttributes(node, cacheName);

    assert a != null;

    updater =
        a.atomicityMode() == GridCacheAtomicityMode.ATOMIC
            ? GridDataLoadCacheUpdaters.<K, V>batched()
            : GridDataLoadCacheUpdaters.<K, V>groupLocked();
  }