http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3811c9a1/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 2a60763..e6ed346 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 @@ -63,7 +63,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** Projection. */ @GridToStringExclude - private CacheProjectionContext<K, V> prj; + private CacheProjectionContext prj; /** Cache queries. */ private CacheQueries<K, V> qry; @@ -84,7 +84,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje * @param prj Optional projection which will be passed to gateway. */ public GridCacheProxyImpl(GridCacheContext<K, V> ctx, GridCacheAdapter<K, V> delegate, - @Nullable CacheProjectionContext<K, V> prj) { + @Nullable CacheProjectionContext 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 CacheProjectionContext<K, V> gateProjection() { + public CacheProjectionContext gateProjection() { return prj; } @@ -132,10 +132,10 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean skipStore() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { - return delegate.skipStore(); + return prj.skipStore(); } finally { gate.leave(prev); @@ -159,7 +159,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public CacheMetrics metrics() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext 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() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return cache.localLoadCacheAsync(p, args); @@ -218,16 +218,16 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje } /** {@inheritDoc} */ - @Override public GridCacheProjectionEx<K, V> forSubjectId(UUID subjId) { - return delegate.forSubjectId(subjId); + @Override public GridCacheProxyImpl<K, V> forSubjectId(UUID subjId) { + return new GridCacheProxyImpl<>(ctx, delegate, prj.forSubjectId(subjId)); } /** {@inheritDoc} */ - @Override public CacheProjection<K, V> setSkipStore(boolean skipStore) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + @Override public GridCacheProxyImpl<K, V> setSkipStore(boolean skipStore) { + CacheProjectionContext prev = gate.enter(prj); try { - return delegate.setSkipStore(skipStore); + return new GridCacheProxyImpl<>(ctx, delegate, prj.setSkipStore(skipStore)); } finally { gate.leave(prev); @@ -235,8 +235,11 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje } /** {@inheritDoc} */ - @Override public <K1, V1> CacheProjection<K1, V1> keepPortable() { - return delegate.keepPortable(); + @Override public <K1, V1> GridCacheProxyImpl<K1, V1> keepPortable() { + if (prj.isKeepPortable()) + return (GridCacheProxyImpl<K1, V1>)this; + + return new GridCacheProxyImpl<>((GridCacheContext<K1, V1>)ctx, (GridCacheAdapter<K1, V1>)delegate, prj.keepPortable()); } /** {@inheritDoc} */ @@ -246,7 +249,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean containsKey(K key) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.containsKey(key); @@ -258,7 +261,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean containsKeys(Collection<? extends K> keys) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.containsKeys(keys); @@ -270,7 +273,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> containsKeyAsync(K key) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.containsKeyAsync(key); @@ -282,7 +285,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> containsKeysAsync(Collection<? extends K> keys) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.containsKeysAsync(keys); @@ -294,7 +297,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Nullable @Override public V get(K key) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.get(key); @@ -306,7 +309,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> getAsync(K key) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.getAsync(key); @@ -318,7 +321,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public V getForcePrimary(K key) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.getForcePrimary(key); @@ -330,7 +333,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> getForcePrimaryAsync(K key) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.getForcePrimaryAsync(key); @@ -342,7 +345,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Nullable @Override public Map<K, V> getAllOutTx(List<K> keys) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.getAllOutTx(keys); @@ -354,7 +357,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean isIgfsDataCache() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.isIgfsDataCache(); @@ -366,7 +369,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public long igfsDataSpaceUsed() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.igfsDataSpaceUsed(); @@ -378,7 +381,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public long igfsDataSpaceMax() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.igfsDataSpaceMax(); @@ -390,7 +393,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean isMongoDataCache() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.isMongoDataCache(); @@ -402,7 +405,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean isMongoMetaCache() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.isMongoMetaCache(); @@ -414,7 +417,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 { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.getAll(keys); @@ -426,7 +429,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Map<K, V>> getAllAsync(@Nullable Collection<? extends K> keys) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.getAllAsync(keys); @@ -439,7 +442,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Nullable @Override public V getAndPut(K key, V val) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.getAndPut(key, val); @@ -451,7 +454,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> getAndPutAsync(K key, V val) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.getAndPutAsync(key, val); @@ -464,7 +467,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean put(K key, V val) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.put(key, val); @@ -476,7 +479,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void putAllConflict(Map<KeyCacheObject, GridCacheDrInfo> drMap) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { delegate.putAllConflict(drMap); @@ -489,7 +492,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> putAllConflictAsync(Map<KeyCacheObject, GridCacheDrInfo> drMap) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.putAllConflictAsync(drMap); @@ -503,7 +506,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 { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.invoke(key, entryProcessor, args); @@ -517,7 +520,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) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.invokeAsync(key, entryProcessor, args); @@ -531,7 +534,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 { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.invokeAll(keys, entryProcessor, args); @@ -546,7 +549,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje Set<? extends K> keys, EntryProcessor<K, V, T> entryProcessor, Object... args) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.invokeAllAsync(keys, entryProcessor, args); @@ -560,7 +563,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 { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.invokeAll(map, args); @@ -574,7 +577,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) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.invokeAllAsync(map, args); @@ -586,7 +589,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> putAsync(K key, V val) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.putAsync(key, val); @@ -598,7 +601,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Nullable @Override public V getAndPutIfAbsent(K key, V val) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.getAndPutIfAbsent(key, val); @@ -610,7 +613,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> getAndPutIfAbsentAsync(K key, V val) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.getAndPutIfAbsentAsync(key, val); @@ -622,7 +625,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean putIfAbsent(K key, V val) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.putIfAbsent(key, val); @@ -634,7 +637,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> putIfAbsentAsync(K key, V val) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.putIfAbsentAsync(key, val); @@ -646,7 +649,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Nullable @Override public V getAndReplace(K key, V val) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.getAndReplace(key, val); @@ -658,7 +661,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> getAndReplaceAsync(K key, V val) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.getAndReplaceAsync(key, val); @@ -670,7 +673,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean replace(K key, V val) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.replace(key, val); @@ -682,7 +685,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> replaceAsync(K key, V val) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.replaceAsync(key, val); @@ -694,7 +697,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean replace(K key, V oldVal, V newVal) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.replace(key, oldVal, newVal); @@ -706,7 +709,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.replaceAsync(key, oldVal, newVal); @@ -718,7 +721,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 { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { delegate.putAll(m); @@ -730,7 +733,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> putAllAsync(@Nullable Map<? extends K, ? extends V> m) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.putAllAsync(m); @@ -742,7 +745,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Set<K> keySet() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.keySet(); @@ -754,7 +757,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Set<K> primaryKeySet() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.primaryKeySet(); @@ -766,7 +769,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Collection<V> values() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.values(); @@ -778,7 +781,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Set<Cache.Entry<K, V>> entrySet() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.entrySet(); @@ -790,7 +793,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Set<Cache.Entry<K, V>> entrySet(int part) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.entrySet(part); @@ -802,7 +805,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Set<Cache.Entry<K, V>> entrySetx(CacheEntryPredicate... filter) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.entrySetx(filter); @@ -814,7 +817,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalTx txStartEx(TransactionConcurrency concurrency, TransactionIsolation isolation) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.txStartEx(concurrency, isolation); @@ -826,7 +829,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolation isolation) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.txStart(concurrency, isolation); @@ -840,7 +843,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolation isolation, long timeout, int txSize) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.txStart(concurrency, isolation, timeout, txSize); @@ -852,7 +855,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Transaction tx() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.tx(); @@ -868,7 +871,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje @Nullable IgniteCacheExpiryPolicy plc) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.localPeek(key, peekModes, plc); @@ -880,7 +883,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Iterable<Cache.Entry<K, V>> localEntries(CachePeekMode[] peekModes) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.localEntries(peekModes); @@ -892,7 +895,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean evict(K key) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.evict(key); @@ -904,7 +907,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void evictAll(@Nullable Collection<? extends K> keys) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { delegate.evictAll(keys); @@ -916,7 +919,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void clearLocally() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { delegate.clearLocally(); @@ -928,7 +931,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void clear() throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { delegate.clear(); @@ -940,7 +943,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> clearAsync() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.clearAsync(); @@ -952,7 +955,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> clearAsync(K key) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.clearAsync(key); @@ -964,7 +967,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> clearAsync(Set<? extends K> keys) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.clearAsync(keys); @@ -976,7 +979,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean clearLocally(K key) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.clearLocally(key); @@ -988,7 +991,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void clearLocallyAll(Set<? extends K> keys) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { delegate.clearLocallyAll(keys); @@ -1000,7 +1003,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void clear(K key) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { delegate.clear(key); @@ -1012,7 +1015,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void clearAll(Set<? extends K> keys) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { delegate.clearAll(keys); @@ -1025,7 +1028,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Nullable @Override public V getAndRemove(K key) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.getAndRemove(key); @@ -1037,7 +1040,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<V> getAndRemoveAsync(K key) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.getAndRemoveAsync(key); @@ -1050,7 +1053,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean remove(K key) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.remove(key); @@ -1063,7 +1066,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void removeAllConflict(Map<KeyCacheObject, GridCacheVersion> drMap) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { delegate.removeAllConflict(drMap); @@ -1077,7 +1080,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje @Override public IgniteInternalFuture<?> removeAllConflictAsync(Map<KeyCacheObject, GridCacheVersion> drMap) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.removeAllConflictAsync(drMap); @@ -1089,7 +1092,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> removeAsync(K key) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.removeAsync(key); @@ -1101,7 +1104,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<GridCacheReturn> replacexAsync(K key, V oldVal, V newVal) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.replacexAsync(key, oldVal, newVal); @@ -1113,7 +1116,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public GridCacheReturn replacex(K key, V oldVal, V newVal) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.replacex(key, oldVal, newVal); @@ -1125,7 +1128,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public GridCacheReturn removex(K key, V val) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.removex(key, val); @@ -1137,7 +1140,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<GridCacheReturn> removexAsync(K key, V val) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.removexAsync(key, val); @@ -1149,7 +1152,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean remove(K key, V val) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.remove(key, val); @@ -1161,7 +1164,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> removeAsync(K key, V val) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.removeAsync(key, val); @@ -1173,7 +1176,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void removeAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { delegate.removeAll(keys); @@ -1185,7 +1188,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.removeAllAsync(keys); @@ -1198,7 +1201,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void removeAll() throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { delegate.removeAll(); @@ -1210,7 +1213,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> removeAllAsync() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.removeAllAsync(); @@ -1223,7 +1226,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean lock(K key, long timeout) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.lock(key, timeout); @@ -1235,7 +1238,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> lockAsync(K key, long timeout) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.lockAsync(key, timeout); @@ -1247,7 +1250,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 { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.lockAll(keys, timeout); @@ -1259,7 +1262,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys, long timeout) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.lockAllAsync(keys, timeout); @@ -1271,7 +1274,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void unlock(K key) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { delegate.unlock(key); @@ -1283,7 +1286,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void unlockAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { delegate.unlockAll(keys); @@ -1295,7 +1298,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean isLocked(K key) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.isLocked(key); @@ -1307,7 +1310,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public boolean isLockedByThread(K key) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.isLockedByThread(key); @@ -1319,7 +1322,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public int size() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.size(); @@ -1331,7 +1334,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public int size(CachePeekMode[] peekModes) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.size(peekModes); @@ -1343,7 +1346,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<Integer> sizeAsync(CachePeekMode[] peekModes) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.sizeAsync(peekModes); @@ -1355,7 +1358,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public int localSize(CachePeekMode[] peekModes) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.localSize(peekModes); @@ -1367,7 +1370,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public int nearSize() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.nearSize(); @@ -1379,7 +1382,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public int primarySize() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.primarySize(); @@ -1391,7 +1394,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public void promoteAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { delegate.promoteAll(keys); @@ -1403,7 +1406,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Iterator<Map.Entry<K, V>> swapIterator() throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return cache.swapIterator(); @@ -1415,7 +1418,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Iterator<Map.Entry<K, V>> offHeapIterator() throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return cache.offHeapIterator(); @@ -1427,7 +1430,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public long offHeapEntriesCount() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return cache.offHeapEntriesCount(); @@ -1439,7 +1442,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public long offHeapAllocatedSize() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return cache.offHeapAllocatedSize(); @@ -1451,7 +1454,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public long swapSize() throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return cache.swapSize(); @@ -1463,7 +1466,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public long swapKeys() throws IgniteCheckedException { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return cache.swapKeys(); @@ -1475,7 +1478,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public Iterator<Cache.Entry<K, V>> iterator() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return delegate.iterator(); @@ -1487,7 +1490,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Override public IgniteInternalFuture<?> forceRepartition() { - CacheProjectionContext<K, V> prev = gate.enter(prj); + CacheProjectionContext prev = gate.enter(prj); try { return cache.forceRepartition(); @@ -1509,7 +1512,7 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { ctx = (GridCacheContext<K, V>)in.readObject(); delegate = (GridCacheAdapter<K, V>)in.readObject(); - prj = (CacheProjectionContext<K, V>)in.readObject(); + prj = (CacheProjectionContext)in.readObject(); gate = ctx.gate(); cache = ctx.cache(); @@ -1523,17 +1526,17 @@ public class GridCacheProxyImpl<K, V> implements GridCache<K, V>, GridCacheProje /** {@inheritDoc} */ @Nullable @Override public ExpiryPolicy expiry() { - return delegate.expiry(); + return prj.expiry(); } /** {@inheritDoc} */ - @Override public GridCacheProjectionEx<K, V> withExpiryPolicy(ExpiryPolicy plc) { - CacheProjectionContext<K, V> prev = gate.enter(prj); + @Override public GridCacheProxyImpl<K, V> withExpiryPolicy(ExpiryPolicy plc) { + CacheProjectionContext prev = gate.enter(prj); try { - GridCacheProjectionEx<K, V> prj0 = prj != null ? prj.withExpiryPolicy(plc) : delegate.withExpiryPolicy(plc); + CacheProjectionContext prj0 = prj.withExpiryPolicy(plc); - return new GridCacheProxyImpl<>(ctx, delegate, (CacheProjectionContext<K, V>)prj0); + return new GridCacheProxyImpl<>(ctx, delegate, prj0); } finally { gate.leave(prev);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3811c9a1/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 fbbd33f..c8d3200 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 @@ -72,7 +72,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V private GridCacheAdapter<K, V> delegate; /** Projection. */ - private CacheProjectionContext<K, V> prjCtx; + private CacheProjectionContext prjCtx; /** */ @GridToStringExclude @@ -98,7 +98,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V public IgniteCacheProxy( GridCacheContext<K, V> ctx, GridCacheAdapter<K, V> delegate, - @Nullable CacheProjectionContext<K, V> prjCtx, + @Nullable CacheProjectionContext prjCtx, boolean async ) { super(async); @@ -131,7 +131,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public CacheMetrics metrics() { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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() { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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() { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext prev = gate.enter(prjCtx); try { - GridCacheProjectionEx<K, V> prj0 = prjCtx != null ? prjCtx.withExpiryPolicy(plc) : delegate.withExpiryPolicy(plc); + CacheProjectionContext prj0 = prjCtx.withExpiryPolicy(plc); - return new IgniteCacheProxy<>(ctx, delegate, (CacheProjectionContext<K, V>)prj0, isAsync()); + return new IgniteCacheProxy<>(ctx, delegate, 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext prev = gate.enter(prjCtx); try { if (isAsync()) { @@ -294,7 +294,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V /** {@inheritDoc} */ @Override public boolean isLocalLocked(K key, boolean byCurrThread) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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"); - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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() { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 ) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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() { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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() { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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 { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext 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() { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext prev = gate.enter(prjCtx); try { return ctx.cache().igniteIterator(); @@ -1407,12 +1407,10 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V * @return Projection for portable objects. */ public <K1, V1> IgniteCache<K1, V1> keepPortable() { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext prev = gate.enter(prjCtx); try { - CacheProjectionContext<K1, V1> prj0 = new CacheProjectionContext<>( - (CacheProjection<K1, V1>)(prjCtx != null ? prjCtx : delegate), - (GridCacheContext<K1, V1>)ctx, + CacheProjectionContext prj0 = new CacheProjectionContext( prjCtx != null ? prjCtx.skipStore() : false, prjCtx != null ? prjCtx.subjectId() : null, true, @@ -1432,7 +1430,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V * @return Cache with skip store enabled. */ public IgniteCache<K, V> skipStore() { - CacheProjectionContext<K, V> prev = gate.enter(prjCtx); + CacheProjectionContext prev = gate.enter(prjCtx); try { boolean skip = prjCtx != null && prjCtx.skipStore(); @@ -1440,9 +1438,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V if (skip) return this; - CacheProjectionContext<K, V> prj0 = new CacheProjectionContext<>( - (prjCtx != null ? prjCtx : delegate), - ctx, + CacheProjectionContext prj0 = new CacheProjectionContext( true, prjCtx != null ? prjCtx.subjectId() : null, prjCtx != null && prjCtx.isKeepPortable(), @@ -1497,7 +1493,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V delegate = (GridCacheAdapter<K, V>)in.readObject(); - prjCtx = (CacheProjectionContext<K, V>)in.readObject(); + prjCtx = (CacheProjectionContext)in.readObject(); gate = ctx.gate(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3811c9a1/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 3aed0d9..e11a75d 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() { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext 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) { - CacheProjectionContext<K, V> old = gate.enter(null); + CacheProjectionContext old = gate.enter(null); try { return delegate.mapPartitionToPrimaryAndBackups(part); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3811c9a1/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 7a304b1..f2c443a 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(); - CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext prj = ctx.projectionPerCall(); ExpiryPolicy plc0 = prj != null ? prj.expiry() : null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3811c9a1/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 e02d826..5f75879 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); - CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext 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); - CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext 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); - CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext prj = ctx.projectionPerCall(); UUID subjId = ctx.subjectIdPerCall(null, prj); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3811c9a1/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 8a5d2da..6b210ff 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 @@ -179,7 +179,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte AffinityTopologyVersion topVer = tx == null ? ctx.affinity().affinityTopologyVersion() : tx.topologyVersion(); - CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext prj = ctx.projectionPerCall(); subjId = ctx.subjectIdPerCall(subjId, prj); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3811c9a1/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 86c0531..8655aea 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); - CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext prj = ctx.projectionPerCall(); subjId = ctx.subjectIdPerCall(subjId, prj); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3811c9a1/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 9f61f8f..81d0791 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> }); } - CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext prj = ctx.projectionPerCall(); subjId = ctx.subjectIdPerCall(subjId, prj); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3811c9a1/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 c2057e7..6724baa 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(); - CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext 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() { - CacheProjectionContext<K, V> prj = ctx.projectionPerCall(); + CacheProjectionContext prj = ctx.projectionPerCall(); ExpiryPolicy expiry = prj != null ? prj.expiry() : null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3811c9a1/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 0ee1f80..565a079 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 CacheProjectionContext<K, V> prj; + private CacheProjectionContext prj; /** * @param ctx Context. * @param prj Projection. */ - public CacheQueriesImpl(GridCacheContext<K, V> ctx, @Nullable CacheProjectionContext<K, V> prj) { + public CacheQueriesImpl(GridCacheContext<K, V> ctx, @Nullable CacheProjectionContext prj) { assert ctx != null; this.ctx = ctx;