http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ddc9178a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java index 66da4cb..2a60763 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java @@ -59,11 +59,11 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** Delegate object. */ @GridToStringExclude - private GridCacheProjectionEx<K, V> delegate; + private GridCacheAdapter<K, V> delegate; /** Projection. */ @GridToStringExclude - private GridCacheProjectionImpl<K, V> prj; + private CacheProjectionContext<K, V> prj; /** Cache queries. */ private CacheQueries<K, V> qry; @@ -83,8 +83,8 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje * @param delegate Delegate object. * @param prj Optional projection which will be passed to gateway. */ - public GridCacheProxyImpl(GridCacheContext<K, V> ctx, GridCacheProjectionEx<K, V> delegate, - @Nullable GridCacheProjectionImpl<K, V> prj) { + public GridCacheProxyImpl(GridCacheContext<K, V> ctx, GridCacheAdapter<K, V> delegate, + @Nullable CacheProjectionContext<K, V> prj) { assert ctx != null; assert delegate != null; @@ -116,7 +116,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** * @return Gateway projection. */ - public GridCacheProjectionImpl<K, V> gateProjection() { + public CacheProjectionContext<K, V> gateProjection() { return prj; } @@ -132,7 +132,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean skipStore() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.skipStore(); @@ -159,7 +159,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public CacheMetrics metrics() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return cache.metrics(); @@ -171,7 +171,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public CacheMetricsMXBean mxBean() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return cache.mxBean(); @@ -183,7 +183,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public long overflowSize() throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return cache.overflowSize(); @@ -195,7 +195,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void localLoadCache(IgniteBiPredicate<K, V> p, @Nullable Object[] args) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { cache.localLoadCache(p, args); @@ -207,7 +207,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> localLoadCacheAsync(IgniteBiPredicate<K, V> p, @Nullable Object[] args) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return cache.localLoadCacheAsync(p, args); @@ -224,7 +224,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public CacheProjection<K, V> setSkipStore(boolean skipStore) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.setSkipStore(skipStore); @@ -246,7 +246,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean containsKey(K key) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.containsKey(key); @@ -258,7 +258,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean containsKeys(Collection<? extends K> keys) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.containsKeys(keys); @@ -270,7 +270,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> containsKeyAsync(K key) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.containsKeyAsync(key); @@ -282,7 +282,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> containsKeysAsync(Collection<? extends K> keys) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.containsKeysAsync(keys); @@ -294,7 +294,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Nullable @Override public V get(K key) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.get(key); @@ -306,7 +306,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> getAsync(K key) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.getAsync(key); @@ -318,7 +318,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public V getForcePrimary(K key) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.getForcePrimary(key); @@ -330,7 +330,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> getForcePrimaryAsync(K key) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.getForcePrimaryAsync(key); @@ -342,7 +342,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Nullable @Override public Map<K, V> getAllOutTx(List<K> keys) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.getAllOutTx(keys); @@ -354,7 +354,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean isIgfsDataCache() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.isIgfsDataCache(); @@ -366,7 +366,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public long igfsDataSpaceUsed() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.igfsDataSpaceUsed(); @@ -378,7 +378,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public long igfsDataSpaceMax() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.igfsDataSpaceMax(); @@ -390,7 +390,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean isMongoDataCache() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.isMongoDataCache(); @@ -402,7 +402,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean isMongoMetaCache() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.isMongoMetaCache(); @@ -414,7 +414,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Map<K, V> getAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.getAll(keys); @@ -426,7 +426,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Map<K, V>> getAllAsync(@Nullable Collection<? extends K> keys) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.getAllAsync(keys); @@ -439,7 +439,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Nullable @Override public V getAndPut(K key, V val) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.getAndPut(key, val); @@ -451,7 +451,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> getAndPutAsync(K key, V val) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.getAndPutAsync(key, val); @@ -464,7 +464,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean put(K key, V val) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.put(key, val); @@ -476,7 +476,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void putAllConflict(Map<KeyCacheObject, GridCacheDrInfo> drMap) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { delegate.putAllConflict(drMap); @@ -489,7 +489,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> putAllConflictAsync(Map<KeyCacheObject, GridCacheDrInfo> drMap) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.putAllConflictAsync(drMap); @@ -503,7 +503,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje @Override public <T> EntryProcessorResult<T> invoke(K key, EntryProcessor<K, V, T> entryProcessor, Object... args) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.invoke(key, entryProcessor, args); @@ -517,7 +517,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje @Override public <T> IgniteInternalFuture<EntryProcessorResult<T>> invokeAsync(K key, EntryProcessor<K, V, T> entryProcessor, Object... args) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.invokeAsync(key, entryProcessor, args); @@ -531,7 +531,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje @Override public <T> Map<K, EntryProcessorResult<T>> invokeAll(Set<? extends K> keys, EntryProcessor<K, V, T> entryProcessor, Object... args) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.invokeAll(keys, entryProcessor, args); @@ -546,7 +546,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje Set<? extends K> keys, EntryProcessor<K, V, T> entryProcessor, Object... args) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.invokeAllAsync(keys, entryProcessor, args); @@ -560,7 +560,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje @Override public <T> Map<K, EntryProcessorResult<T>> invokeAll( Map<? extends K, ? extends EntryProcessor<K, V, T>> map, Object... args) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.invokeAll(map, args); @@ -574,7 +574,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje @Override public <T> IgniteInternalFuture<Map<K, EntryProcessorResult<T>>> invokeAllAsync( Map<? extends K, ? extends EntryProcessor<K, V, T>> map, Object... args) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.invokeAllAsync(map, args); @@ -586,7 +586,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> putAsync(K key, V val) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.putAsync(key, val); @@ -598,7 +598,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Nullable @Override public V getAndPutIfAbsent(K key, V val) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.getAndPutIfAbsent(key, val); @@ -610,7 +610,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> getAndPutIfAbsentAsync(K key, V val) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.getAndPutIfAbsentAsync(key, val); @@ -622,7 +622,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean putIfAbsent(K key, V val) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.putIfAbsent(key, val); @@ -634,7 +634,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> putIfAbsentAsync(K key, V val) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.putIfAbsentAsync(key, val); @@ -646,7 +646,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Nullable @Override public V getAndReplace(K key, V val) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.getAndReplace(key, val); @@ -658,7 +658,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> getAndReplaceAsync(K key, V val) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.getAndReplaceAsync(key, val); @@ -670,7 +670,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean replace(K key, V val) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.replace(key, val); @@ -682,7 +682,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> replaceAsync(K key, V val) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.replaceAsync(key, val); @@ -694,7 +694,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean replace(K key, V oldVal, V newVal) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.replace(key, oldVal, newVal); @@ -706,7 +706,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.replaceAsync(key, oldVal, newVal); @@ -718,7 +718,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void putAll(@Nullable Map<? extends K, ? extends V> m) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { delegate.putAll(m); @@ -730,7 +730,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> putAllAsync(@Nullable Map<? extends K, ? extends V> m) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.putAllAsync(m); @@ -742,7 +742,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Set<K> keySet() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.keySet(); @@ -754,7 +754,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Set<K> primaryKeySet() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.primaryKeySet(); @@ -766,7 +766,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Collection<V> values() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.values(); @@ -778,7 +778,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Set<Cache.Entry<K, V>> entrySet() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.entrySet(); @@ -790,7 +790,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Set<Cache.Entry<K, V>> entrySet(int part) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.entrySet(part); @@ -802,7 +802,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Set<Cache.Entry<K, V>> entrySetx(CacheEntryPredicate... filter) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.entrySetx(filter); @@ -814,7 +814,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalTx txStartEx(TransactionConcurrency concurrency, TransactionIsolation isolation) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.txStartEx(concurrency, isolation); @@ -826,7 +826,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolation isolation) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.txStart(concurrency, isolation); @@ -840,7 +840,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolation isolation, long timeout, int txSize) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.txStart(concurrency, isolation, timeout, txSize); @@ -852,7 +852,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Transaction tx() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.tx(); @@ -868,7 +868,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje @Nullable IgniteCacheExpiryPolicy plc) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.localPeek(key, peekModes, plc); @@ -880,7 +880,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Iterable<Cache.Entry<K, V>> localEntries(CachePeekMode[] peekModes) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.localEntries(peekModes); @@ -892,7 +892,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean evict(K key) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.evict(key); @@ -904,7 +904,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void evictAll(@Nullable Collection<? extends K> keys) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { delegate.evictAll(keys); @@ -916,7 +916,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void clearLocally() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { delegate.clearLocally(); @@ -928,7 +928,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void clear() throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { delegate.clear(); @@ -940,7 +940,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> clearAsync() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.clearAsync(); @@ -952,7 +952,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> clearAsync(K key) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.clearAsync(key); @@ -964,7 +964,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> clearAsync(Set<? extends K> keys) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.clearAsync(keys); @@ -976,7 +976,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean clearLocally(K key) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.clearLocally(key); @@ -988,7 +988,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void clearLocallyAll(Set<? extends K> keys) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { delegate.clearLocallyAll(keys); @@ -1000,7 +1000,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void clear(K key) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { delegate.clear(key); @@ -1012,7 +1012,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void clearAll(Set<? extends K> keys) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { delegate.clearAll(keys); @@ -1025,7 +1025,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Nullable @Override public V getAndRemove(K key) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.getAndRemove(key); @@ -1037,7 +1037,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> getAndRemoveAsync(K key) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.getAndRemoveAsync(key); @@ -1050,7 +1050,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean remove(K key) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.remove(key); @@ -1063,7 +1063,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void removeAllConflict(Map<KeyCacheObject, GridCacheVersion> drMap) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { delegate.removeAllConflict(drMap); @@ -1077,7 +1077,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje @Override public IgniteInternalFuture<?> removeAllConflictAsync(Map<KeyCacheObject, GridCacheVersion> drMap) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.removeAllConflictAsync(drMap); @@ -1089,7 +1089,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> removeAsync(K key) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.removeAsync(key); @@ -1101,7 +1101,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<GridCacheReturn> replacexAsync(K key, V oldVal, V newVal) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.replacexAsync(key, oldVal, newVal); @@ -1113,7 +1113,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public GridCacheReturn replacex(K key, V oldVal, V newVal) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.replacex(key, oldVal, newVal); @@ -1125,7 +1125,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public GridCacheReturn removex(K key, V val) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.removex(key, val); @@ -1137,7 +1137,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<GridCacheReturn> removexAsync(K key, V val) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.removexAsync(key, val); @@ -1149,7 +1149,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean remove(K key, V val) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.remove(key, val); @@ -1161,7 +1161,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> removeAsync(K key, V val) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.removeAsync(key, val); @@ -1173,7 +1173,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void removeAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { delegate.removeAll(keys); @@ -1185,7 +1185,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.removeAllAsync(keys); @@ -1198,7 +1198,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void removeAll() throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { delegate.removeAll(); @@ -1210,7 +1210,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> removeAllAsync() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.removeAllAsync(); @@ -1223,7 +1223,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean lock(K key, long timeout) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.lock(key, timeout); @@ -1235,7 +1235,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> lockAsync(K key, long timeout) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.lockAsync(key, timeout); @@ -1247,7 +1247,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean lockAll(@Nullable Collection<? extends K> keys, long timeout) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.lockAll(keys, timeout); @@ -1259,7 +1259,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys, long timeout) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.lockAllAsync(keys, timeout); @@ -1271,7 +1271,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void unlock(K key) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { delegate.unlock(key); @@ -1283,7 +1283,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void unlockAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { delegate.unlockAll(keys); @@ -1295,7 +1295,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean isLocked(K key) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.isLocked(key); @@ -1307,7 +1307,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean isLockedByThread(K key) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.isLockedByThread(key); @@ -1319,7 +1319,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public int size() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.size(); @@ -1331,7 +1331,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public int size(CachePeekMode[] peekModes) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.size(peekModes); @@ -1343,7 +1343,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Integer> sizeAsync(CachePeekMode[] peekModes) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.sizeAsync(peekModes); @@ -1355,7 +1355,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public int localSize(CachePeekMode[] peekModes) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.localSize(peekModes); @@ -1367,7 +1367,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public int nearSize() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.nearSize(); @@ -1379,7 +1379,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public int primarySize() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.primarySize(); @@ -1391,7 +1391,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void promoteAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { delegate.promoteAll(keys); @@ -1403,7 +1403,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Iterator<Map.Entry<K, V>> swapIterator() throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return cache.swapIterator(); @@ -1415,7 +1415,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Iterator<Map.Entry<K, V>> offHeapIterator() throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return cache.offHeapIterator(); @@ -1427,7 +1427,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public long offHeapEntriesCount() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return cache.offHeapEntriesCount(); @@ -1439,7 +1439,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public long offHeapAllocatedSize() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return cache.offHeapAllocatedSize(); @@ -1451,7 +1451,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public long swapSize() throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return cache.swapSize(); @@ -1463,7 +1463,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public long swapKeys() throws IgniteCheckedException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return cache.swapKeys(); @@ -1475,7 +1475,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Iterator<Cache.Entry<K, V>> iterator() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return delegate.iterator(); @@ -1487,7 +1487,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> forceRepartition() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { return cache.forceRepartition(); @@ -1508,8 +1508,8 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje @SuppressWarnings({"unchecked"}) @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { ctx = (GridCacheContext<K, V>)in.readObject(); - delegate = (GridCacheProjectionEx<K, V>)in.readObject(); - prj = (GridCacheProjectionImpl<K, V>)in.readObject(); + delegate = (GridCacheAdapter<K, V>)in.readObject(); + prj = (CacheProjectionContext<K, V>)in.readObject(); gate = ctx.gate(); cache = ctx.cache(); @@ -1528,12 +1528,12 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public GridCacheProjectionEx<K, V> withExpiryPolicy(ExpiryPolicy plc) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prj); try { GridCacheProjectionEx<K, V> prj0 = prj != null ? prj.withExpiryPolicy(plc) : delegate.withExpiryPolicy(plc); - return new GridCacheProxyImpl<>(ctx, prj0, (GridCacheProjectionImpl<K, V>)prj0); + return new GridCacheProxyImpl<>(ctx, delegate, (CacheProjectionContext<K, V>)prj0); } finally { gate.leave(prev);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ddc9178a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java index b890407..fbbd33f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java @@ -69,10 +69,10 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** Delegate. */ @GridToStringInclude - private GridCacheProjectionEx<K, V> delegate; + private GridCacheAdapter<K, V> delegate; /** Projection. */ - private GridCacheProjectionImpl<K, V> prj; + private CacheProjectionContext<K, V> prjCtx; /** */ @GridToStringExclude @@ -92,13 +92,13 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** * @param ctx Context. * @param delegate Delegate. - * @param prj Projection. + * @param prjCtx Projection. * @param async Async support flag. */ public IgniteCacheProxy( GridCacheContext<K, V> ctx, - GridCacheProjectionEx<K, V> delegate, - @Nullable GridCacheProjectionImpl<K, V> prj, + GridCacheAdapter<K, V> delegate, + @Nullable CacheProjectionContext<K, V> prjCtx, boolean async ) { super(async); @@ -108,11 +108,11 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V this.ctx = ctx; this.delegate = delegate; - this.prj = prj; + this.prjCtx = prjCtx; gate = ctx.gate(); - legacyProxy = new GridCacheProxyImpl<>(ctx, delegate, prj); + legacyProxy = new GridCacheProxyImpl<>(ctx, delegate, prjCtx); } /** @@ -131,7 +131,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public CacheMetrics metrics() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { return ctx.cache().metrics(); @@ -143,7 +143,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public CacheMetrics metrics(ClusterGroup grp) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { List<CacheMetrics> metrics = new ArrayList<>(grp.nodes().size()); @@ -168,7 +168,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public CacheMetricsMXBean mxBean() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { return ctx.cache().mxBean(); @@ -190,7 +190,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Nullable @Override public Entry<K, V> randomEntry() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { return ctx.cache().randomEntry(); @@ -202,12 +202,12 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public IgniteCache<K, V> withExpiryPolicy(ExpiryPolicy plc) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { - GridCacheProjectionEx<K, V> prj0 = prj != null ? prj.withExpiryPolicy(plc) : delegate.withExpiryPolicy(plc); + GridCacheProjectionEx<K, V> prj0 = prjCtx != null ? prjCtx.withExpiryPolicy(plc) : delegate.withExpiryPolicy(plc); - return new IgniteCacheProxy<>(ctx, prj0, (GridCacheProjectionImpl<K, V>)prj0, isAsync()); + return new IgniteCacheProxy<>(ctx, delegate, (CacheProjectionContext<K, V>)prj0, isAsync()); } finally { gate.leave(prev); @@ -222,7 +222,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void loadCache(@Nullable IgniteBiPredicate<K, V> p, @Nullable Object... args) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) @@ -242,7 +242,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void localLoadCache(@Nullable IgniteBiPredicate<K, V> p, @Nullable Object... args) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) @@ -262,7 +262,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Nullable @Override public V getAndPutIfAbsent(K key, V val) throws CacheException { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -289,12 +289,12 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public Lock lockAll(final Collection<? extends K> keys) { - return new CacheLockImpl<>(gate, delegate, prj, keys); + return new CacheLockImpl<>(gate, delegate, prjCtx, keys); } /** {@inheritDoc} */ @Override public boolean isLocalLocked(K key, boolean byCurrThread) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { return byCurrThread ? delegate.isLockedByThread(key) : delegate.isLocked(key); @@ -449,7 +449,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V @Override public <R> QueryCursor<R> query(Query<R> qry) { A.notNull(qry, "qry"); - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { ctx.checkSecurity(SecurityPermission.CACHE_READ); @@ -511,7 +511,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public Iterable<Entry<K, V>> localEntries(CachePeekMode... peekModes) throws CacheException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { return delegate.localEntries(peekModes); @@ -526,7 +526,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public QueryMetrics queryMetrics() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { return delegate.queries().metrics(); @@ -538,7 +538,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void localEvict(Collection<? extends K> keys) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { delegate.evictAll(keys); @@ -550,7 +550,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Nullable @Override public V localPeek(K key, CachePeekMode... peekModes) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { return delegate.localPeek(key, peekModes, null); @@ -566,7 +566,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void localPromote(Set<? extends K> keys) throws CacheException { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { delegate.promoteAll(keys); @@ -582,7 +582,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public int size(CachePeekMode... peekModes) throws CacheException { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -603,7 +603,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public int localSize(CachePeekMode... peekModes) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { return delegate.localSize(peekModes); @@ -619,7 +619,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public V get(K key) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -642,7 +642,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public Map<K, V> getAll(Set<? extends K> keys) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -668,7 +668,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V */ public Map<K, V> getAll(Collection<? extends K> keys) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -695,7 +695,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V * @return Entry set. */ public Set<Entry<K, V>> entrySetx(CacheEntryPredicate... filter) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { return delegate.entrySetx(filter); @@ -707,7 +707,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public boolean containsKey(K key) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -725,7 +725,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public boolean containsKeys(Set<? extends K> keys) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -747,7 +747,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V boolean replaceExisting, @Nullable final CompletionListener completionLsnr ) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { IgniteInternalFuture<?> fut = ctx.cache().loadAll(keys, replaceExisting); @@ -775,7 +775,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void put(K key, V val) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) @@ -795,7 +795,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public V getAndPut(K key, V val) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -818,7 +818,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void putAll(Map<? extends K, ? extends V> map) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) @@ -838,7 +838,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public boolean putIfAbsent(K key, V val) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -861,7 +861,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public boolean remove(K key) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -884,7 +884,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public boolean remove(K key, V oldVal) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -907,7 +907,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public V getAndRemove(K key) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -930,7 +930,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public boolean replace(K key, V oldVal, V newVal) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -953,7 +953,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public boolean replace(K key, V val) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -976,7 +976,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public V getAndReplace(K key, V val) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -999,7 +999,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void removeAll(Set<? extends K> keys) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) @@ -1018,7 +1018,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void removeAll() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) @@ -1036,7 +1036,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void clear(K key) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) @@ -1054,7 +1054,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void clearAll(Set<? extends K> keys) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) @@ -1072,7 +1072,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void clear() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) @@ -1090,7 +1090,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void localClear(K key) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { delegate.clearLocally(key); @@ -1102,7 +1102,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void localClearAll(Set<? extends K> keys) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { for (K key : keys) @@ -1117,7 +1117,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V @Override public <T> T invoke(K key, EntryProcessor<K, V, T> entryProcessor, Object... args) throws EntryProcessorException { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -1155,7 +1155,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V @Override public <T> T invoke(K key, CacheEntryProcessor<K, V, T> entryProcessor, Object... args) throws EntryProcessorException { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -1194,7 +1194,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V EntryProcessor<K, V, T> entryProcessor, Object... args) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -1219,7 +1219,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V CacheEntryProcessor<K, V, T> entryProcessor, Object... args) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -1244,7 +1244,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V Map<? extends K, ? extends EntryProcessor<K, V, T>> map, Object... args) { try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -1338,7 +1338,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void registerCacheEntryListener(CacheEntryListenerConfiguration<K, V> lsnrCfg) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { ctx.continuousQueries().executeJCacheQuery(lsnrCfg, false); @@ -1353,7 +1353,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public void deregisterCacheEntryListener(CacheEntryListenerConfiguration<K, V> lsnrCfg) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { ctx.continuousQueries().cancelJCacheQuery(lsnrCfg); @@ -1368,7 +1368,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public Iterator<Cache.Entry<K, V>> iterator() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { return ctx.cache().igniteIterator(); @@ -1380,7 +1380,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override protected IgniteCache<K, V> createAsyncInstance() { - return new IgniteCacheProxy<>(ctx, delegate, prj, true); + return new IgniteCacheProxy<>(ctx, delegate, prjCtx, true); } /** @@ -1407,19 +1407,19 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V * @return Projection for portable objects. */ public <K1, V1> IgniteCache<K1, V1> keepPortable() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { - GridCacheProjectionImpl<K1, V1> prj0 = new GridCacheProjectionImpl<>( - (CacheProjection<K1, V1>)(prj != null ? prj : delegate), + CacheProjectionContext<K1, V1> prj0 = new CacheProjectionContext<>( + (CacheProjection<K1, V1>)(prjCtx != null ? prjCtx : delegate), (GridCacheContext<K1, V1>)ctx, - prj != null ? prj.skipStore() : false, - prj != null ? prj.subjectId() : null, + prjCtx != null ? prjCtx.skipStore() : false, + prjCtx != null ? prjCtx.subjectId() : null, true, - prj != null ? prj.expiry() : null); + prjCtx != null ? prjCtx.expiry() : null); return new IgniteCacheProxy<>((GridCacheContext<K1, V1>)ctx, - prj0, + (GridCacheAdapter<K1, V1>)delegate, prj0, isAsync()); } @@ -1432,24 +1432,24 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V * @return Cache with skip store enabled. */ public IgniteCache<K, V> skipStore() { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + CacheProjectionContext<K, V> prev = gate.enter(prjCtx); try { - boolean skip = prj != null && prj.skipStore(); + boolean skip = prjCtx != null && prjCtx.skipStore(); if (skip) return this; - GridCacheProjectionImpl<K, V> prj0 = new GridCacheProjectionImpl<>( - (prj != null ? prj : delegate), + CacheProjectionContext<K, V> prj0 = new CacheProjectionContext<>( + (prjCtx != null ? prjCtx : delegate), ctx, true, - prj != null ? prj.subjectId() : null, - prj != null && prj.isKeepPortable(), - prj != null ? prj.expiry() : null); + prjCtx != null ? prjCtx.subjectId() : null, + prjCtx != null && prjCtx.isKeepPortable(), + prjCtx != null ? prjCtx.expiry() : null); return new IgniteCacheProxy<>(ctx, - prj0, + delegate, prj0, isAsync()); } @@ -1487,7 +1487,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V out.writeObject(delegate); - out.writeObject(prj); + out.writeObject(prjCtx); } /** {@inheritDoc} */ @@ -1495,9 +1495,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { ctx = (GridCacheContext<K, V>)in.readObject(); - delegate = (GridCacheProjectionEx<K, V>)in.readObject(); + delegate = (GridCacheAdapter<K, V>)in.readObject(); - prj = (GridCacheProjectionImpl<K, V>)in.readObject(); + prjCtx = (CacheProjectionContext<K, V>)in.readObject(); gate = ctx.gate(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ddc9178a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityProxy.java index 6959a70..3aed0d9 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityProxy.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityProxy.java @@ -60,7 +60,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override public int partitions() { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.partitions(); @@ -72,7 +72,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override public int partition(K key) { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.partition(key); @@ -84,7 +84,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override public boolean isPrimary(ClusterNode n, K key) { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.isPrimary(n, key); @@ -96,7 +96,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override public boolean isBackup(ClusterNode n, K key) { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.isBackup(n, key); @@ -108,7 +108,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override public boolean isPrimaryOrBackup(ClusterNode n, K key) { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.isPrimaryOrBackup(n, key); @@ -120,7 +120,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override public int[] primaryPartitions(ClusterNode n) { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.primaryPartitions(n); @@ -132,7 +132,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override public int[] backupPartitions(ClusterNode n) { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.backupPartitions(n); @@ -144,7 +144,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override public int[] allPartitions(ClusterNode n) { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.allPartitions(n); @@ -156,7 +156,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override public ClusterNode mapPartitionToNode(int part) { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.mapPartitionToNode(part); @@ -168,7 +168,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override public Map<Integer, ClusterNode> mapPartitionsToNodes(Collection<Integer> parts) { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.mapPartitionsToNodes(parts); @@ -180,7 +180,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override public Object affinityKey(K key) { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.affinityKey(key); @@ -193,7 +193,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override @Nullable public ClusterNode mapKeyToNode(K key) { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.mapKeyToNode(key); @@ -205,7 +205,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override public Map<ClusterNode, Collection<K>> mapKeysToNodes(@Nullable Collection<? extends K> keys) { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.mapKeysToNodes(keys); @@ -217,7 +217,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override public Collection<ClusterNode> mapKeyToPrimaryAndBackups(K key) { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.mapKeyToPrimaryAndBackups(key); @@ -229,7 +229,7 @@ public class GridCacheAffinityProxy<K, V> implements Affinity<K>, Externalizable /** {@inheritDoc} */ @Override public Collection<ClusterNode> mapPartitionToPrimaryAndBackups(int part) { - GridCacheProjectionImpl<K, V> old = gate.enter(null); + CacheProjectionContext<K, V> old = gate.enter(null); try { return delegate.mapPartitionToPrimaryAndBackups(part); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ddc9178a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java index 6e6cb04..7a304b1 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java @@ -396,7 +396,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap final AffinityTopologyVersion topVer = ctx.affinity().affinityTopologyVersion(); - GridCacheProjectionImpl<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); ExpiryPolicy plc0 = prj != null ? prj.expiry() : null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ddc9178a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java index ce90f82..e02d826 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java @@ -267,7 +267,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> { if (keyCheck) validateCacheKeys(keys); - GridCacheProjectionImpl<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); subjId = ctx.subjectIdPerCall(null, prj); @@ -748,7 +748,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> { ctx.checkSecurity(SecurityPermission.CACHE_PUT); - GridCacheProjectionImpl<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); UUID subjId = ctx.subjectIdPerCall(null, prj); @@ -809,7 +809,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> { ctx.checkSecurity(SecurityPermission.CACHE_REMOVE); - GridCacheProjectionImpl<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); UUID subjId = ctx.subjectIdPerCall(null, prj); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ddc9178a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java index dca312d..8a5d2da 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java @@ -35,7 +35,6 @@ import org.apache.ignite.plugin.security.*; import org.apache.ignite.transactions.*; import org.jetbrains.annotations.*; -import javax.cache.*; import java.io.*; import java.util.*; @@ -180,7 +179,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte AffinityTopologyVersion topVer = tx == null ? ctx.affinity().affinityTopologyVersion() : tx.topologyVersion(); - GridCacheProjectionImpl<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); subjId = ctx.subjectIdPerCall(subjId, prj); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ddc9178a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java index a80a42b..86c0531 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java @@ -372,7 +372,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { if (keyCheck) validateCacheKeys(keys); - GridCacheProjectionImpl<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); subjId = ctx.subjectIdPerCall(subjId, prj); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ddc9178a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java index e9cdffc..9f61f8f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java @@ -126,7 +126,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V> }); } - GridCacheProjectionImpl<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); subjId = ctx.subjectIdPerCall(subjId, prj); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ddc9178a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java index 6938a38..c2057e7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java @@ -478,7 +478,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { if (F.isEmpty(keys)) return Collections.emptyMap(); - GridCacheProjectionImpl<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); UUID subjId = ctx.subjectIdPerCall(null, prj); @@ -1440,7 +1440,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { * @return Expiry policy. */ @Nullable private ExpiryPolicy expiryPerCall() { - GridCacheProjectionImpl<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); ExpiryPolicy expiry = prj != null ? prj.expiry() : null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ddc9178a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueriesImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueriesImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueriesImpl.java index 10bc4b3..0ee1f80 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueriesImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueriesImpl.java @@ -40,13 +40,13 @@ public class CacheQueriesImpl<K, V> implements CacheQueries<K, V> { private GridCacheContext<K, V> ctx; /** */ - private GridCacheProjectionImpl<K, V> prj; + private CacheProjectionContext<K, V> prj; /** * @param ctx Context. * @param prj Projection. */ - public CacheQueriesImpl(GridCacheContext<K, V> ctx, @Nullable GridCacheProjectionImpl<K, V> prj) { + public CacheQueriesImpl(GridCacheContext<K, V> ctx, @Nullable CacheProjectionContext<K, V> prj) { assert ctx != null; this.ctx = ctx;