ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [12/27] incubator-ignite git commit: IGNITE-59 Move CacheLock to org.apache.ignite.cache package.
Date Wed, 21 Jan 2015 17:30:34 GMT
IGNITE-59 Move CacheLock to org.apache.ignite.cache package.


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

Branch: refs/heads/ignite-53
Commit: b7db215475729a5bfa71851d2d1692b13f3df383
Parents: 841ec8d
Author: Sergey Evdokimov <sergey.evdokimov@jetbrains.com>
Authored: Wed Jan 21 00:08:26 2015 +0300
Committer: Sergey Evdokimov <sergey.evdokimov@jetbrains.com>
Committed: Wed Jan 21 00:08:26 2015 +0300

----------------------------------------------------------------------
 .../main/java/org/apache/ignite/CacheLock.java  | 61 -------------------
 .../java/org/apache/ignite/IgniteCache.java     |  1 -
 .../java/org/apache/ignite/cache/CacheLock.java | 62 ++++++++++++++++++++
 .../processors/cache/CacheLockAsyncImpl.java    |  2 +-
 .../processors/cache/CacheLockImpl.java         |  1 +
 .../cache/GridCacheAbstractFullApiSelfTest.java |  1 +
 .../GridCacheMultiNodeLockAbstractTest.java     |  3 +-
 .../dht/GridCacheColocatedDebugTest.java        |  1 +
 .../near/GridCachePartitionedLockSelfTest.java  |  2 +-
 .../GridCacheLocalMultithreadedSelfTest.java    |  1 +
 10 files changed, 69 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b7db2154/modules/core/src/main/java/org/apache/ignite/CacheLock.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/CacheLock.java b/modules/core/src/main/java/org/apache/ignite/CacheLock.java
deleted file mode 100644
index f395261..0000000
--- a/modules/core/src/main/java/org/apache/ignite/CacheLock.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite;
-
-import org.apache.ignite.lang.*;
-
-import java.util.concurrent.*;
-import java.util.concurrent.locks.*;
-
-/**
- * Lock associated with some cache keys.
- */
-public interface CacheLock extends Lock, IgniteAsyncSupport {
-    /**
-     * Checks if any node holds lock on at least one key associated with this {@code CacheLock}.
-     * <p>
-     * This is a local in-VM operation and does not involve any network trips
-     * or access to persistent storage in any way.
-     *
-     * @return {@code True} if lock is owned by some node.
-     * @see {@link IgniteCache#isLocked(Object)}
-     */
-    public boolean isLocked();
-
-    /**
-     * Checks if current thread holds lock on at least one key associated with this {@code
CacheLock}.
-     * <p>
-     * This is a local in-VM operation and does not involve any network trips
-     * or access to persistent storage in any way.
-     *
-     * @return {@code True} if key is locked by current thread.
-     * @see {@link IgniteCache#isLockedByThread(Object)}
-     */
-    public boolean isLockedByThread();
-
-    /** {@inheritDoc} */
-    @IgniteAsyncSupported
-    @Override public void lock();
-
-    /** {@inheritDoc} */
-    @IgniteAsyncSupported
-    @Override public boolean tryLock(long time, TimeUnit unit) throws InterruptedException;
-
-    /** {@inheritDoc} */
-    @Override public CacheLock enableAsync();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b7db2154/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 93bd108..1398ebe 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -31,7 +31,6 @@ import javax.cache.expiry.*;
 import javax.cache.processor.*;
 import java.util.*;
 import java.util.concurrent.*;
-import java.util.concurrent.locks.*;
 
 /**
  * Main entry point for all <b>Data Grid APIs.</b> You can get a named cache
by calling {@link Ignite#cache(String)}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b7db2154/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
new file mode 100644
index 0000000..82d6043
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheLock.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.cache;
+
+import org.apache.ignite.*;
+import org.apache.ignite.lang.*;
+
+import java.util.concurrent.*;
+import java.util.concurrent.locks.*;
+
+/**
+ * Lock associated with some cache keys.
+ */
+public interface CacheLock extends Lock, IgniteAsyncSupport {
+    /**
+     * Checks if any node holds lock on at least one key associated with this {@code CacheLock}.
+     * <p>
+     * This is a local in-VM operation and does not involve any network trips
+     * or access to persistent storage in any way.
+     *
+     * @return {@code True} if lock is owned by some node.
+     * @see {@link IgniteCache#isLocked(Object)}
+     */
+    public boolean isLocked();
+
+    /**
+     * Checks if current thread holds lock on at least one key associated with this {@code
CacheLock}.
+     * <p>
+     * This is a local in-VM operation and does not involve any network trips
+     * or access to persistent storage in any way.
+     *
+     * @return {@code True} if key is locked by current thread.
+     * @see {@link IgniteCache#isLockedByThread(Object)}
+     */
+    public boolean isLockedByThread();
+
+    /** {@inheritDoc} */
+    @IgniteAsyncSupported
+    @Override public void lock();
+
+    /** {@inheritDoc} */
+    @IgniteAsyncSupported
+    @Override public boolean tryLock(long time, TimeUnit unit) throws InterruptedException;
+
+    /** {@inheritDoc} */
+    @Override public CacheLock enableAsync();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b7db2154/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockAsyncImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockAsyncImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockAsyncImpl.java
index 5005982..6eee3ae 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockAsyncImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockAsyncImpl.java
@@ -18,8 +18,8 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.jetbrains.annotations.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b7db2154/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java
index e80c7f8..df40a23 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLockImpl.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.lang.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.processors.cache.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b7db2154/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 57f9c59..7c615de 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
@@ -19,6 +19,7 @@ package org.gridgain.grid.kernal.processors.cache;
 
 import com.google.common.collect.*;
 import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b7db2154/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
index 1188022..0b5b44e 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
@@ -19,10 +19,10 @@ package org.gridgain.grid.kernal.processors.cache.distributed;
 
 import com.google.common.collect.*;
 import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
@@ -30,7 +30,6 @@ import org.gridgain.grid.kernal.processors.cache.distributed.near.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.gridgain.grid.util.typedef.*;
 import org.gridgain.testframework.*;
 import org.gridgain.testframework.junits.common.*;
 import org.jetbrains.annotations.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b7db2154/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
index 1b6209d..ffba769 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
@@ -18,6 +18,7 @@
 package org.gridgain.grid.kernal.processors.cache.distributed.dht;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.transactions.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b7db2154/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 3df071b..ec3069d 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,10 +18,10 @@
 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.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b7db2154/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java
index 452dc48..fc9db3d 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalMultithreadedSelfTest.java
@@ -19,6 +19,7 @@ package org.gridgain.grid.kernal.processors.cache.local;
 
 import com.google.common.collect.*;
 import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
 import org.gridgain.grid.cache.*;


Mime
View raw message