ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [06/20] incubator-ignite git commit: #IGNITE-497 Extract CacheConflictManager interface.
Date Tue, 31 Mar 2015 10:39:14 GMT
#IGNITE-497 Extract CacheConflictManager interface.


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

Branch: refs/heads/ignite-sprint-3
Commit: 4b3079ca91cc86971114639846130edaed63cc9b
Parents: f16ec2a
Author: nikolay_tikhonov <ntikhonov@gridgain.com>
Authored: Mon Mar 23 18:56:24 2015 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Mon Mar 23 18:56:24 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/GridKernalContextImpl.java  |  2 +-
 .../processors/cache/CacheConflictManager.java  |  4 +--
 .../cache/CacheOsConflictManager.java           | 33 ++++++++++++++++++++
 .../cache/CacheStubConflictManager.java         | 32 -------------------
 .../loadtests/hashmap/GridCacheTestContext.java |  2 +-
 5 files changed, 37 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b3079ca/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
index b3d5cc0..789fe4c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
@@ -784,7 +784,7 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable
         else if (cls.equals(IgniteCacheObjectProcessor.class))
             return (T)new IgniteCacheObjectProcessorImpl(this);
         else if (cls.equals(CacheConflictManager.class))
-            return (T)new CacheStubConflictManager<>();
+            return (T)new CacheOsConflictManager<>();
 
         throw new IgniteException("Unsupported component type: " + cls);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b3079ca/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheConflictManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheConflictManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheConflictManager.java
index 3d9de4a..5f4e35d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheConflictManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheConflictManager.java
@@ -22,9 +22,9 @@ import org.apache.ignite.internal.processors.cache.version.*;
 /**
  * Conflict resolver manager.
  */
-public abstract class CacheConflictManager<K, V> extends GridCacheManagerAdapter<K,
V> {
+public interface CacheConflictManager<K, V> extends GridCacheManager<K, V> {
     /**
      * @return Cache conflict resolver.
      */
-    public abstract CacheVersionConflictResolver conflictResolver();
+    public CacheVersionConflictResolver conflictResolver();
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b3079ca/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOsConflictManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOsConflictManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOsConflictManager.java
new file mode 100644
index 0000000..b63580e
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOsConflictManager.java
@@ -0,0 +1,33 @@
+/*
+ * 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.internal.processors.cache;
+
+import org.apache.ignite.internal.processors.cache.version.*;
+
+/**
+ * OS conflict resolver manager.
+ */
+public class CacheOsConflictManager<K ,V> extends GridCacheManagerAdapter<K ,V>
+    implements CacheConflictManager<K, V> {
+    /**
+     * @return Cache conflict resolver.
+     */
+    @Override public CacheVersionConflictResolver conflictResolver() {
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b3079ca/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheStubConflictManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheStubConflictManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheStubConflictManager.java
deleted file mode 100644
index 943ca69..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheStubConflictManager.java
+++ /dev/null
@@ -1,32 +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.internal.processors.cache;
-
-import org.apache.ignite.internal.processors.cache.version.*;
-
-/**
- * Stub conflict resolver manager.
- */
-public class CacheStubConflictManager<K ,V> extends CacheConflictManager<K ,V>
{
-    /**
-     * @return Cache conflict resolver.
-     */
-    @Override public CacheVersionConflictResolver conflictResolver() {
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b3079ca/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
index 95bf8bd..795d0b8 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
@@ -69,6 +69,6 @@ public class GridCacheTestContext<K, V> extends GridCacheContext<K,
V> {
             new GridCacheTtlManager(),
             new GridOsCacheDrManager(),
             new CacheNoopJtaManager(),
-            new CacheStubConflictManager<K, V>());
+            new CacheOsConflictManager<K, V>());
     }
 }


Mime
View raw message