ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # ignite-1
Date Fri, 12 Dec 2014 12:00:19 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1 15ec8cf54 -> d7309f496


# ignite-1


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

Branch: refs/heads/ignite-1
Commit: d7309f496504ba2af36975bd6cdb5ac20db90b28
Parents: 15ec8cf
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Dec 12 15:00:05 2014 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Dec 12 15:00:05 2014 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCache.java     |  2 +-
 .../processors/cache/IgniteCacheProxy.java      | 26 ++++++++++++++------
 2 files changed, 20 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7309f49/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index 0b513ba..3123221 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -206,7 +206,7 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K,
V>, IgniteAsyncS
 
     public QueryCursor<List<?>> localQueryFields(QuerySqlPredicate<K, V>
filter);
 
-    public Iterable<Entry<K, V>> localEntries(GridCachePeekMode... peekModes)
throws CacheException;
+    public Iterable<Entry<K, V>> localEntries(CachePeekMode... peekModes) throws
CacheException;
 
     public Map<K, V> localPartition(int part) throws CacheException;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7309f49/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 f582bd7..5971d69 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
@@ -125,19 +125,31 @@ public class IgniteCacheProxy<K, V> implements IgniteCache<K,
V>, Externalizable
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isLocked(Object key) {
-        // TODO IGNITE-1.
-        throw new UnsupportedOperationException();
+    @Override public boolean isLocked(K key) {
+        GridCacheProjectionImpl<K, V> prev = gate.enter(null);
+
+        try {
+            return delegate.isLocked(key);
+        }
+        finally {
+            gate.leave(prev);
+        }
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isLockedByThread(Object key) {
-        // TODO IGNITE-1.
-        throw new UnsupportedOperationException();
+    @Override public boolean isLockedByThread(K key) {
+        GridCacheProjectionImpl<K, V> prev = gate.enter(null);
+
+        try {
+            return delegate.isLockedByThread(key);
+        }
+        finally {
+            gate.leave(prev);
+        }
     }
 
     /** {@inheritDoc} */
-    @Override public Iterable<Entry<K, V>> localEntries(GridCachePeekMode...
peekModes) throws CacheException {
+    @Override public Iterable<Entry<K, V>> localEntries(CachePeekMode... peekModes)
throws CacheException {
         // TODO IGNITE-1.
         throw new UnsupportedOperationException();
     }


Mime
View raw message