public class GridDataLoadCacheUpdaters extends Object
| Constructor and Description |
|---|
GridDataLoadCacheUpdaters() |
public static <K,V> GridDataLoadCacheUpdater<K,V> individual()
GridCacheProjection.put(Object, Object, GridPredicate[]) and
GridCacheProjection.remove(Object, GridPredicate[]) operations. Thus it is safe from deadlocks but performance
is not the best.public static <K,V> GridDataLoadCacheUpdater<K,V> batched()
GridCacheProjection.putAll(Map, GridPredicate[]) and
GridCacheProjection.removeAll(Collection, GridPredicate[]). Can cause deadlocks if the same keys are getting
updated concurrently. Performance is generally better than in individual().public static <K extends Comparable<?>,V> GridDataLoadCacheUpdater<K,V> batchedSorted()
GridCacheProjection.putAll(Map, GridPredicate[]) and
GridCacheProjection.removeAll(Collection, GridPredicate[]). Keys are sorted in natural order and if all updates
use the same rule deadlock can not happen. Performance is generally better than in individual().public static <K,V> GridDataLoadCacheUpdater<K,V> groupLocked()
GridCacheProjection.putAll(Map, GridPredicate[]) and
GridCacheProjection.removeAll(Collection, GridPredicate[]) in group lock transaction. Requires that there are no
concurrent updates other than in group lock.protected static <K,V> void updateAll(GridCacheProjection<K,V> cache, @Nullable Collection<K> rmvCol, Map<K,V> putMap) throws GridException
cache - Cache.rmvCol - Keys to remove.putMap - Entries to put.GridException - If failed.Copyright © 2014. All rights reserved.