# ignite-683-2
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7703ed19 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7703ed19 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7703ed19 Branch: refs/heads/ignite-218 Commit: 7703ed1954e5e26056d4318fd13165425e788a46 Parents: 826b270 Author: sboikov <sboi...@gridgain.com> Authored: Mon Apr 13 11:58:21 2015 +0300 Committer: sboikov <sboi...@gridgain.com> Committed: Mon Apr 13 11:58:21 2015 +0300 ---------------------------------------------------------------------- .../processors/cache/GridCacheAdapter.java | 34 ++++---------------- .../GridCacheMultiNodeLockAbstractTest.java | 4 ++- .../ignite/cache/hibernate/HibernateRegion.java | 2 +- 3 files changed, 11 insertions(+), 29 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7703ed19/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java index 802d134..0e45746 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java @@ -1956,7 +1956,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @return Previous value associated with specified key, or {@code null} * if entry did not pass the filter, or if there was no mapping for the key in swap * or in persistent storage. - * @throws IgniteCheckedException + * @throws IgniteCheckedException If failed. */ public V put(K key, V val, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException { return put0(key, val, filter); @@ -1968,8 +1968,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** - * Internal method that is called from {@link CacheEntryImpl}. - * * @param key Key. * @param val Value. * @param filter Optional filter. @@ -2007,8 +2005,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** - * Internal method that is called from {@link CacheEntryImpl}. - * * @param key Key. * @param val Value. * @param filter Optional filter. @@ -2045,8 +2041,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param filter Filter. * @return Put operation future. */ - public IgniteInternalFuture<V> putAsync(K key, V val, - @Nullable CacheEntryPredicate[] filter) { + public IgniteInternalFuture<V> putAsync(K key, V val, @Nullable CacheEntryPredicate[] filter) { final boolean statsEnabled = ctx.config().isStatisticsEnabled(); final long start = statsEnabled ? System.nanoTime() : 0L; @@ -2060,8 +2055,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** - * Internal method that is called from {@link CacheEntryImpl}. - * * @param key Key. * @param val Value. * @param filter Optional filter. @@ -2392,8 +2385,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** - * Internal method that is called from {@link CacheEntryImpl}. - * * @param key Key. * @param val Value. * @param filter Optional filter. @@ -2779,8 +2770,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** - * Internal method that is called from {@link CacheEntryImpl}. - * * @param key Key to remove. * @param filter Optional filter. * @return Previous value. @@ -2798,10 +2787,10 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, V prevVal = syncOp(new SyncOp<V>(true) { @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException { - V ret = (V) tx.removeAllAsync(ctx, Collections.singletonList(key), null, true, filter).get().value(); + V ret = tx.removeAllAsync(ctx, Collections.singletonList(key), null, true, filter).get().value(); if (ctx.config().getInterceptor() != null) - return (V) ctx.config().getInterceptor().onBeforeRemove(new CacheEntryImpl(key, ret)).get2(); + return (V)ctx.config().getInterceptor().onBeforeRemove(new CacheEntryImpl(key, ret)).get2(); return ret; } @@ -2832,14 +2821,11 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** - * Internal method that is called from {@link CacheEntryImpl}. - * * @param key Key to remove. * @param filter Optional filter. * @return Put operation future. */ - public IgniteInternalFuture<V> removeAsync0(final K key, - @Nullable final CacheEntryPredicate... filter) { + public IgniteInternalFuture<V> removeAsync0(final K key, @Nullable final CacheEntryPredicate... filter) { final boolean statsEnabled = ctx.config().isStatisticsEnabled(); final long start = statsEnabled ? System.nanoTime() : 0L; @@ -2959,15 +2945,12 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** - * Internal method that is called from {@link CacheEntryImpl}. - * * @param key Key to remove. * @param filter Optional filter. * @return Previous value. * @throws IgniteCheckedException If failed. */ - public boolean removex0(final K key, - @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException { + public boolean removex0(final K key, @Nullable final CacheEntryPredicate... filter) throws IgniteCheckedException { boolean statsEnabled = ctx.config().isStatisticsEnabled(); long start = statsEnabled ? System.nanoTime() : 0L; @@ -3001,14 +2984,11 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** - * Internal method that is called from {@link CacheEntryImpl}. - * * @param key Key to remove. * @param filter Optional filter. * @return Putx operation future. */ - public IgniteInternalFuture<Boolean> removexAsync0(final K key, - @Nullable final CacheEntryPredicate... filter) { + public IgniteInternalFuture<Boolean> removexAsync0(final K key, @Nullable final CacheEntryPredicate... filter) { final boolean statsEnabled = ctx.config().isStatisticsEnabled(); final long start = statsEnabled ? System.nanoTime() : 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7703ed19/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java index ff8622a..8f107e4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java @@ -154,6 +154,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr /** * @param cache Cache. * @param key Key. + * @throws IgniteCheckedException If failed. */ @SuppressWarnings({"BusyWait"}) private void checkUnlocked(IgniteCache<Integer,String> cache, Integer key) throws IgniteCheckedException { @@ -195,9 +196,9 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr } /** - * * @param cache Cache. * @param keys Keys. + * @throws IgniteCheckedException If failed. */ private void checkUnlocked(IgniteCache<Integer,String> cache, Iterable<Integer> keys) throws IgniteCheckedException { for (Integer key : keys) @@ -228,6 +229,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr * * @param key Key. * @return Entries. + * @throws IgniteCheckedException If failed. */ private String entries(int key) throws IgniteCheckedException { if (partitioned()) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7703ed19/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateRegion.java ---------------------------------------------------------------------- diff --git a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateRegion.java b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateRegion.java index f284a29..3bcaaa3 100644 --- a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateRegion.java +++ b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateRegion.java @@ -86,7 +86,7 @@ public class HibernateRegion implements Region { /** {@inheritDoc} */ @Override public Map toMap() { - return new HashMap(); + return Collections.emptyMap(); } /** {@inheritDoc} */