ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [05/22] incubator-ignite git commit: ignite-59: review
Date Thu, 22 Jan 2015 13:20:14 GMT
ignite-59: 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/7f36224c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7f36224c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7f36224c

Branch: refs/heads/ignite-49
Commit: 7f36224c0d4ee56c0de548f60c222b4fd10ba615
Parents: d36f8bb
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Wed Jan 21 18:56:47 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Wed Jan 21 18:56:47 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/cache/CacheLock.java   | 18 ++++--------------
 .../cache/GridCacheAbstractFullApiSelfTest.java   |  3 ++-
 .../near/GridCachePartitionedLockSelfTest.java    |  6 +-----
 3 files changed, 7 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f36224c/modules/core/src/main/java/org/apache/ignite/cache/CacheLock.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheLock.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheLock.java
index 43aff7a..96e44d6 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheLock.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheLock.java
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,10 +18,8 @@
 package org.apache.ignite.cache;
 
 import org.apache.ignite.*;
-import org.apache.ignite.lang.*;
 import org.jetbrains.annotations.*;
 
-import java.util.concurrent.*;
 import java.util.concurrent.locks.*;
 
 /**
@@ -50,18 +48,10 @@ public interface CacheLock extends Lock {
      */
     public boolean isLockedByThread();
 
-    /** {@inheritDoc} */
-    @IgniteAsyncSupported
-    @Override public void lock();
-
-    /** {@inheritDoc} */
-    @IgniteAsyncSupported
-    @Override public boolean tryLock(long time, TimeUnit unit) throws InterruptedException;
-
     /**
-     * The method is unsupported.
+     * The method is not supported, {@link UnsupportedOperationException} will be thrown.
      *
-     * @return Nothing, this method is unsupported, {@link UnsupportedOperationException}
will be thrown.
+     * @return This method is not supported, {@link UnsupportedOperationException} will be
thrown.
      */
     @NotNull @Override public Condition newCondition();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f36224c/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index cf9c0d6..a9e8395 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -3486,7 +3486,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
 
                     try {
                         assert lock.tryLock();
-                    } finally {
+                    }
+                    finally {
                         lock.unlock();
                     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f36224c/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLockSelfTest.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLockSelfTest.java
index 4179544..7db1221 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLockSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLockSelfTest.java
@@ -18,9 +18,7 @@
 package org.gridgain.grid.kernal.processors.cache.distributed.near;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
-import org.apache.ignite.lang.*;
 import org.apache.log4j.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.processors.cache.*;
@@ -66,7 +64,7 @@ public class GridCachePartitionedLockSelfTest extends GridCacheLockAbstractTest
         IgniteConfiguration cfg = new IgniteConfiguration();
 
         cfg.setGridName(getTestGridName(0));
-        cfg.setRestEnabled(false);
+        cfg.setClientConnectionConfiguration(null);
         cfg.setCacheConfiguration(new GridCacheConfiguration());
 
         final Ignite g0 = G.start(cfg);
@@ -84,7 +82,5 @@ public class GridCachePartitionedLockSelfTest extends GridCacheLockAbstractTest
                 return cache.lockAll(Collections.singleton(1)).tryLock(Long.MAX_VALUE, TimeUnit.MILLISECONDS);
             }
         }, CacheException.class, "Locks are not supported");
-
-        CacheLock lock = g0.jcache(null).lock(1);
     }
 }


Mime
View raw message