ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [11/50] [abbrv] incubator-ignite git commit: # ignite-645 review
Date Fri, 03 Apr 2015 12:59:02 GMT
# ignite-645 review


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/282e8a57
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/282e8a57
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/282e8a57

Branch: refs/heads/ignite-tests-todo
Commit: 282e8a5717722eafeec0bb7abb5b2e75f8399f9e
Parents: 7f69f2a
Author: sboikov <semen.boikov@inria.fr>
Authored: Wed Apr 1 23:25:08 2015 +0300
Committer: sboikov <semen.boikov@inria.fr>
Committed: Wed Apr 1 23:25:08 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheEntryEx.java         |  8 ++++----
 .../processors/cache/GridCacheMapEntry.java        | 13 -------------
 .../cache/distributed/dht/GridDhtCacheAdapter.java |  6 +++---
 .../distributed/dht/atomic/GridDhtAtomicCache.java |  6 +++---
 .../dht/colocated/GridDhtColocatedCache.java       | 17 +++++++++--------
 .../distributed/near/GridNearCacheAdapter.java     | 14 ++++++--------
 .../processors/task/GridTaskProcessor.java         |  2 +-
 7 files changed, 26 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/282e8a57/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
index adeb95b..c0f1d35 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
@@ -580,10 +580,10 @@ public interface GridCacheEntryEx {
     /**
      * Peeks into entry without loading value or updating statistics.
      *
-     * @param heap Heap.
-     * @param offheap Offheap.
-     * @param swap Swap.
-     * @param plc Policy.
+     * @param heap Read from heap flag.
+     * @param offheap Read from offheap flag.
+     * @param swap Read from swap flag.
+     * @param plc Expiry policy if TTL should be updated.
      * @return Value.
      * @throws GridCacheEntryRemovedException If entry has been removed.
      * @throws IgniteCheckedException If failed.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/282e8a57/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 5bc255f..45fbced 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -2857,19 +2857,6 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx
{
 
     /**
      * @param failFast Fail fast flag.
-     * @param filter Filter.
-     * @param tx Transaction to peek value at (if mode is TX value).
-     * @return Peeked value.
-     * @throws GridCacheFilterFailedException If filter failed.
-     */
-    @Nullable private GridTuple<CacheObject> peekTx(boolean failFast,
-        CacheEntryPredicate[] filter,
-        @Nullable IgniteInternalTx tx) throws GridCacheFilterFailedException {
-        return tx == null ? null : tx.peek(cctx, failFast, key, filter);
-    }
-
-    /**
-     * @param failFast Fail fast flag.
      * @param topVer Topology version.
      * @param filter Filter.
      * @param expiryPlc Optional expiry policy.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/282e8a57/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 475fea6..c9a23b6 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
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.distributed.dht;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.affinity.*;
@@ -877,8 +876,9 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
 
             try {
                 return partId == ctx.affinity().partition(entry.getKey()) &&
-                    F.eq(entry.getValue(), localPeek(entry.getKey(), new CachePeekMode[]
{CachePeekMode.ONHEAP}, null));
-            } catch (IgniteCheckedException e) {
+                    F.eq(entry.getValue(), localPeek(entry.getKey(), CachePeekModes.ONHEAP_ONLY,
null));
+            }
+            catch (IgniteCheckedException e) {
                 throw new IgniteException(e);
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/282e8a57/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 2d7f58f..b8639d9 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
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.distributed.dht.atomic;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.cluster.*;
@@ -254,8 +253,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
     /** {@inheritDoc} */
     @Override public Cache.Entry<K, V> entry(K key) throws GridDhtInvalidPartitionException
{
         try {
-            return new CacheEntryImpl<>(key, localPeek(key, new CachePeekMode[] {CachePeekMode.ONHEAP},
null));
-        } catch (IgniteCheckedException e) {
+            return new CacheEntryImpl<>(key, localPeek(key, CachePeekModes.ONHEAP_ONLY,
null));
+        }
+        catch (IgniteCheckedException e) {
             throw new IgniteException(e);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/282e8a57/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 8d4f153..0782a37 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
@@ -80,13 +80,14 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
         map.setEntryFactory(new GridCacheMapEntryFactory() {
             /** {@inheritDoc} */
             @Override public GridCacheMapEntry create(GridCacheContext ctx,
-                                                      AffinityTopologyVersion topVer,
-                                                      KeyCacheObject key,
-                                                      int hash,
-                                                      CacheObject val,
-                                                      GridCacheMapEntry next,
-                                                      long ttl,
-                                                      int hdrId) {
+                AffinityTopologyVersion topVer,
+                KeyCacheObject key,
+                int hash,
+                CacheObject val,
+                GridCacheMapEntry next,
+                long ttl,
+                int hdrId)
+            {
                 return new GridDhtColocatedCacheEntry(ctx, topVer, key, hash, val, next,
ttl, hdrId);
             }
         });
@@ -389,7 +390,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
     /** {@inheritDoc} */
     @Override public Cache.Entry<K, V> entry(K key) throws GridDhtInvalidPartitionException
{
         try {
-            return new CacheEntryImpl<>(key, localPeek(key, new CachePeekMode[] {CachePeekMode.ONHEAP},
null));
+            return new CacheEntryImpl<>(key, localPeek(key, CachePeekModes.ONHEAP_ONLY,
null));
         }
         catch (IgniteCheckedException e) {
             throw new IgniteException(e);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/282e8a57/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
index 241af05..b08a49b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
@@ -441,8 +441,9 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
         // We don't try wrap entry from near or dht cache.
         // Created object will be wrapped once some method is called.
         try {
-            return new CacheEntryImpl<>(key, localPeek(key, new CachePeekMode[] {CachePeekMode.ONHEAP},
null));
-        } catch (IgniteCheckedException e) {
+            return new CacheEntryImpl<>(key, localPeek(key, CachePeekModes.ONHEAP_ONLY,
null));
+        }
+        catch (IgniteCheckedException e) {
             throw new IgniteException(e);
         }
     }
@@ -455,13 +456,10 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
      */
     @Nullable public V peekNearOnly(K key) {
         try {
-            return localPeek(key, new CachePeekMode[] {CachePeekMode.ONHEAP}, null);
+            return localPeek(key, CachePeekModes.ONHEAP_ONLY, null);
         }
-        catch (IgniteCheckedException ignored) {
-            if (log.isDebugEnabled())
-                log.debug("Filter validation failed for key: " + key);
-
-            return null;
+        catch (IgniteCheckedException e) {
+            throw new IgniteException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/282e8a57/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
index 4add987..274310e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
@@ -346,7 +346,7 @@ public class GridTaskProcessor extends GridProcessorAdapter {
 
         try {
             return tasksMetaCache.localPeek(
-                new GridTaskNameHashKey(taskNameHash), new CachePeekMode[] {CachePeekMode.ONHEAP},
null);
+                new GridTaskNameHashKey(taskNameHash), CachePeekModes.ONHEAP_ONLY, null);
         }
         catch (IgniteCheckedException e) {
             throw new IgniteException(e);


Mime
View raw message