ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [06/50] [abbrv] incubator-ignite git commit: #ignite-180: Small fixes.
Date Thu, 09 Apr 2015 16:51:34 GMT
#ignite-180: Small fixes.


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

Branch: refs/heads/ignite-537
Commit: d8b2315beff844353d47c378ce7073bdddbc69e7
Parents: 6556af6
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Tue Apr 7 12:14:25 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Tue Apr 7 12:14:25 2015 +0300

----------------------------------------------------------------------
 .../CacheDataStructuresCacheKey.java            | 26 +++++++++++++++-----
 .../datastructures/DataStructuresProcessor.java |  6 ++---
 .../IgniteCollectionAbstractTest.java           |  5 ++--
 .../IgniteDataStructureUniqueNameTest.java      |  7 +++---
 4 files changed, 28 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d8b2315b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CacheDataStructuresCacheKey.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CacheDataStructuresCacheKey.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CacheDataStructuresCacheKey.java
index 5ac4f8c..6a69486 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CacheDataStructuresCacheKey.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CacheDataStructuresCacheKey.java
@@ -1,14 +1,28 @@
+/*
+ * 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.datastructures;
 
-import org.apache.ignite.internal.processors.cache.GridCacheInternal;
+import org.apache.ignite.internal.processors.cache.*;
 
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
+import java.io.*;
 
 /**
- * Created by ira on 4/6/15.
+ * Internal key for data structures processor.
  */
 public class CacheDataStructuresCacheKey implements GridCacheInternal, Externalizable {
     /** */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d8b2315b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
index ed18785..dea96aa 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
@@ -53,7 +53,7 @@ public final class DataStructuresProcessor extends GridProcessorAdapter
{
 
     /** */
     public static final CacheDataStructuresCacheKey DATA_STRUCTURES_CACHE_KEY =
-            new CacheDataStructuresCacheKey();
+        new CacheDataStructuresCacheKey();
 
     /** Initial capacity. */
     private static final int INITIAL_CAPACITY = 10;
@@ -720,7 +720,6 @@ public final class DataStructuresProcessor extends GridProcessorAdapter
{
         CacheConfiguration ccfg = new CacheConfiguration();
 
         ccfg.setName(name);
-
         ccfg.setBackups(cfg.backups());
         ccfg.setCacheMode(cfg.cacheMode());
         ccfg.setMemoryMode(cfg.memoryMode());
@@ -1155,8 +1154,7 @@ public final class DataStructuresProcessor extends GridProcessorAdapter
{
      * @return Removed value.
      */
     @SuppressWarnings("unchecked")
-    @Nullable
-    private <T> T retryRemove(final GridCache cache, final Object key) throws IgniteCheckedException
{
+    @Nullable private <T> T retryRemove(final GridCache cache, final Object key) throws
IgniteCheckedException {
         return retry(log, new Callable<T>() {
             @Nullable @Override public T call() throws Exception {
                 return (T)cache.remove(key);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d8b2315b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java
index 2056bca..7fd5755 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java
@@ -52,7 +52,7 @@ public abstract class IgniteCollectionAbstractTest extends GridCommonAbstractTes
         cfg.setDiscoverySpi(spi);
 
         // TODO IGNITE-180: remove cache configuration when dynamic cache start is implemented.
-        /*TestCollectionConfiguration colCfg = collectionConfiguration();
+        TestCollectionConfiguration colCfg = collectionConfiguration();
 
         assertNotNull(colCfg);
 
@@ -67,7 +67,7 @@ public abstract class IgniteCollectionAbstractTest extends GridCommonAbstractTes
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setRebalanceMode(SYNC);
 
-        cfg.setCacheConfiguration(ccfg);*/
+        cfg.setCacheConfiguration(ccfg);
 
         return cfg;
     }
@@ -79,7 +79,6 @@ public abstract class IgniteCollectionAbstractTest extends GridCommonAbstractTes
     protected final CollectionConfiguration config(boolean collocated) {
         CollectionConfiguration cfg = new CollectionConfiguration();
 
-        //cfg.setCacheName(COL_CACHE_NAME);
         TestCollectionConfiguration colCfg = collectionConfiguration();
         cfg.atomicityMode(colCfg.getAtomicityMode());
         cfg.memoryMode(colCfg.getMemoryMode());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d8b2315b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
index ee6622d..f762ded 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
@@ -86,14 +86,15 @@ public class IgniteDataStructureUniqueNameTest extends IgniteCollectionAbstractT
     /**
      * @throws Exception If failed.
      */
-    /*public void testQueueAtomicClockCache() throws Exception {
+    public void testQueueAtomicClockCache() throws Exception {
         final String queueName = "testQueueAtomicClockCache";
 
         GridTestUtils.assertThrows(log, new Callable<Void>() {
             @Override public Void call() throws Exception {
                 CollectionConfiguration colCfg = new CollectionConfiguration();
 
-                colCfg.setCacheName(ATOMIC_CLOCK_CACHE_NAME);
+                colCfg.cacheMode(PARTITIONED);
+                colCfg.atomicityMode(ATOMIC);
 
                 ignite(0).queue(queueName, 0, colCfg);
 
@@ -103,7 +104,7 @@ public class IgniteDataStructureUniqueNameTest extends IgniteCollectionAbstractT
             "(change write order mode to PRIMARY in configuration)");
 
         assertNull(ignite(0).queue(queueName, 0, null));
-    }*/
+    }
 
     /**
      * @throws Exception If failed.


Mime
View raw message