ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [20/50] [abbrv] incubator-ignite git commit: # ignite-6
Date Thu, 05 Feb 2015 11:50:31 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueAdapter.java
index b490261..f614793 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueAdapter.java
@@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.datastructures;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.datastructures.*;
+import org.apache.ignite.datastructures.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -35,7 +35,7 @@ import java.util.concurrent.*;
 import static java.util.concurrent.TimeUnit.*;
 
 /**
- * Common code for {@link org.apache.ignite.IgniteQueue} implementation.
+ * Common code for {@link IgniteQueue} implementation.
  */
 public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> implements IgniteQueue<T> {
     /** Value returned by closure updating queue header indicating that queue was removed. */
@@ -125,7 +125,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
     }
 
     /** {@inheritDoc} */
-    @Override public int capacity() throws IgniteCheckedException {
+    @Override public int capacity() {
         return cap;
     }
 
@@ -198,7 +198,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
             return new QueueIterator(hdr);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
     }
 
@@ -221,7 +221,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
             catch (InterruptedException e) {
                 Thread.currentThread().interrupt();
 
-                throw new IgniteException("Queue put interrupted.", e);
+                throw new IgniteInterruptedException("Queue put interrupted.", e);
             }
 
             checkStopping();
@@ -259,7 +259,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
             catch (InterruptedException e) {
                 Thread.currentThread().interrupt();
 
-                throw new IgniteException("Queue put interrupted.", e);
+                throw new IgniteInterruptedException("Queue put interrupted.", e);
             }
 
             if (retVal)
@@ -278,7 +278,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
             catch (InterruptedException e) {
                 Thread.currentThread().interrupt();
 
-                throw new IgniteException("Queue take interrupted.", e);
+                throw new IgniteInterruptedException("Queue take interrupted.", e);
             }
 
             checkStopping();
@@ -309,7 +309,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
             catch (InterruptedException e) {
                 Thread.currentThread().interrupt();
 
-                throw new IgniteException("Queue poll interrupted.", e);
+                throw new IgniteInterruptedException("Queue poll interrupted.", e);
             }
 
             if (retVal != null)
@@ -340,7 +340,8 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
         A.ensure(batchSize >= 0, "Batch size cannot be negative: " + batchSize);
 
         try {
-            IgniteBiTuple<Long, Long> t = (IgniteBiTuple<Long, Long>)cache.invoke(queueKey, new ClearProcessor(id)).get();
+            IgniteBiTuple<Long, Long> t =
+                (IgniteBiTuple<Long, Long>)cache.invoke(queueKey, new ClearProcessor(id)).get();
 
             if (t == null)
                 return;
@@ -350,7 +351,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
             removeKeys(id, queueName, collocated, t.get1(), t.get2(), batchSize);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
     }
 
@@ -416,7 +417,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
     }
 
     /**
-     * Checks result of closure modifying queue header, throws {@link org.apache.ignite.cache.datastructures.DataStructureRemovedException}
+     * Checks result of closure modifying queue header, throws {@link org.apache.ignite.datastructures.DataStructureRemovedException}
      * if queue was removed.
      *
      * @param idx Result of closure execution.
@@ -427,7 +428,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
     }
 
     /**
-     * Checks queue state, throws {@link org.apache.ignite.cache.datastructures.DataStructureRemovedException} if queue was removed.
+     * Checks queue state, throws {@link org.apache.ignite.datastructures.DataStructureRemovedException} if queue was removed.
      *
      * @param hdr Queue hdr.
      */
@@ -439,7 +440,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
     /**
      * Marks queue as removed.
      *
-     * @param throw0 If {@code true} then throws {@link org.apache.ignite.cache.datastructures.DataStructureRemovedException}.
+     * @param throw0 If {@code true} then throws {@link org.apache.ignite.datastructures.DataStructureRemovedException}.
      */
     public void onRemoved(boolean throw0) {
         rmvd = true;
@@ -492,7 +493,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
      */
     private void checkStopping() {
         if (cctx.kernalContext().isStopping())
-            throw new IgniteException("Grid is stopping");
+            throw new IgniteException("Ignite is stopping");
     }
 
     /**
@@ -525,19 +526,24 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
         if (rmvd)
             return;
 
-        GridCacheQueueHeader hdr = (GridCacheQueueHeader)cache.getAndRemove(new GridCacheQueueHeaderKey(queueName));
+        try {
+            GridCacheQueueHeader hdr = (GridCacheQueueHeader)cache.remove(new GridCacheQueueHeaderKey(queueName), null);
 
-        rmvd = true;
+            rmvd = true;
 
-        if (hdr == null || hdr.empty())
-            return;
+            if (hdr == null || hdr.empty())
+                return;
 
-        removeKeys(hdr.id(),
-            queueName,
-            hdr.collocated(),
-            hdr.head(),
-            hdr.tail(),
-            0);
+            removeKeys(hdr.id(),
+                queueName,
+                hdr.collocated(),
+                hdr.head(),
+                hdr.tail(),
+                0);
+        }
+        catch (IgniteCheckedException e) {
+            throw U.convertException(e);
+        }
     }
 
     /**
@@ -548,8 +554,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
      * @return Item key.
      */
     private static GridCacheQueueItemKey itemKey(IgniteUuid id, String queueName, boolean collocated, long idx) {
-        return collocated ? new CollocatedItemKey(id, queueName, idx) :
-            new GridCacheQueueItemKey(id, queueName, idx);
+        return collocated ? new CollocatedItemKey(id, queueName, idx) : new GridCacheQueueItemKey(id, queueName, idx);
     }
 
     /**
@@ -641,7 +646,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
                 cur = null;
             }
             catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                throw U.convertException(e);
             }
         }
     }
@@ -779,7 +784,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
                     hdr.collocated(),
                     hdr.head() + 1,
                     hdr.tail(),
-                    rmvdIdxs);
+                    null);
 
                 e.setValue(newHdr);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueProxy.java
index 7a5450c..6751884 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueProxy.java
@@ -93,7 +93,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.add(item);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -115,7 +115,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.offer(item);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -137,7 +137,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.addAll(items);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -160,7 +160,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.contains(item);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -182,7 +182,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.containsAll(items);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -207,7 +207,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
                 delegate.clear();
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -230,7 +230,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.remove(item);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -252,7 +252,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.removeAll(items);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -274,7 +274,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.isEmpty();
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -296,7 +296,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.iterator();
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -318,7 +318,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.toArray();
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -341,7 +341,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.toArray(a);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -363,7 +363,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.retainAll(items);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -385,7 +385,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.size();
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -407,7 +407,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.poll();
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -429,7 +429,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.peek();
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -454,7 +454,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
                 delegate.clear(batchSize);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -476,7 +476,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.remainingCapacity();
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -498,7 +498,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.drainTo(c);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -520,7 +520,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.drainTo(c, maxElements);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -542,7 +542,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.remove();
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -564,7 +564,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.element();
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -589,7 +589,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
                 delegate.put(item);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -611,7 +611,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.offer(item, timeout, unit);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -633,7 +633,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.take();
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -655,7 +655,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
             return delegate.poll(timeout, unit);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -680,7 +680,7 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
                 delegate.close();
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -693,17 +693,17 @@ public class GridCacheQueueProxy<T> implements IgniteQueue<T>, Externalizable {
     }
 
     /** {@inheritDoc} */
-    @Override public int capacity() throws IgniteCheckedException {
+    @Override public int capacity() {
         return delegate.capacity();
     }
 
     /** {@inheritDoc} */
-    @Override public boolean bounded() throws IgniteCheckedException {
+    @Override public boolean bounded() {
         return delegate.bounded();
     }
 
     /** {@inheritDoc} */
-    @Override public boolean collocated() throws IgniteCheckedException {
+    @Override public boolean collocated() {
         return delegate.collocated();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java
index 7380e27..06a0845 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java
@@ -20,9 +20,9 @@ package org.apache.ignite.internal.processors.datastructures;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.datastructures.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
+import org.apache.ignite.datastructures.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.*;
@@ -132,7 +132,7 @@ public class GridCacheSetImpl<T> extends AbstractCollection<T> implements Ignite
             return sum;
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
     }
 
@@ -291,7 +291,7 @@ public class GridCacheSetImpl<T> extends AbstractCollection<T> implements Ignite
             }
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
     }
 
@@ -318,7 +318,7 @@ public class GridCacheSetImpl<T> extends AbstractCollection<T> implements Ignite
             }
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
     }
 
@@ -338,7 +338,7 @@ public class GridCacheSetImpl<T> extends AbstractCollection<T> implements Ignite
             ctx.dataStructures().removeSet(name);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
     }
 
@@ -375,7 +375,7 @@ public class GridCacheSetImpl<T> extends AbstractCollection<T> implements Ignite
             return it;
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
     }
 
@@ -388,7 +388,7 @@ public class GridCacheSetImpl<T> extends AbstractCollection<T> implements Ignite
             return CacheDataStructuresProcessor.retry(log, call);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
     }
 
@@ -459,7 +459,7 @@ public class GridCacheSetImpl<T> extends AbstractCollection<T> implements Ignite
     }
 
     /**
-     * Throws {@link org.apache.ignite.cache.datastructures.DataStructureRemovedException} if set was removed.
+     * Throws {@link org.apache.ignite.datastructures.DataStructureRemovedException} if set was removed.
      */
     private void checkRemoved() {
         if (rmvd)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetProxy.java
index 8fec999..3a60ace 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetProxy.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.internal.processors.datastructures;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.datastructures.*;
+import org.apache.ignite.datastructures.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.util.*;
@@ -105,7 +105,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
                 return delegate.size();
             }
             catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                throw U.convertException(e);
             }
             finally {
                 gate.leave();
@@ -134,7 +134,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
                 return delegate.isEmpty();
             }
             catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                throw U.convertException(e);
             }
             finally {
                 gate.leave();
@@ -163,7 +163,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
                 return delegate.contains(o);
             }
             catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                throw U.convertException(e);
             }
             finally {
                 gate.leave();
@@ -192,7 +192,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
                 return delegate.toArray();
             }
             catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                throw U.convertException(e);
             }
             finally {
                 gate.leave();
@@ -221,7 +221,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
                 return delegate.toArray(a);
             }
             catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                throw U.convertException(e);
             }
             finally {
                 gate.leave();
@@ -250,7 +250,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
                 return delegate.add(t);
             }
             catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                throw U.convertException(e);
             }
             finally {
                 gate.leave();
@@ -279,7 +279,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
                 return delegate.remove(o);
             }
             catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                throw U.convertException(e);
             }
             finally {
                 gate.leave();
@@ -308,7 +308,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
                 return delegate.containsAll(c);
             }
             catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                throw U.convertException(e);
             }
             finally {
                 gate.leave();
@@ -337,7 +337,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
                 return delegate.addAll(c);
             }
             catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                throw U.convertException(e);
             }
             finally {
                 gate.leave();
@@ -366,7 +366,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
                 return delegate.retainAll(c);
             }
             catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                throw U.convertException(e);
             }
             finally {
                 gate.leave();
@@ -395,7 +395,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
                 return delegate.removeAll(c);
             }
             catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                throw U.convertException(e);
             }
             finally {
                 gate.leave();
@@ -427,7 +427,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
                     delegate.clear();
             }
             catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                throw U.convertException(e);
             }
             finally {
                 gate.leave();
@@ -456,7 +456,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
                 return delegate.iterator();
             }
             catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
+                throw U.convertException(e);
             }
             finally {
                 gate.leave();
@@ -485,7 +485,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
                 delegate.close();
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             gate.leave();
@@ -498,7 +498,7 @@ public class GridCacheSetProxy<T> implements IgniteSet<T>, Externalizable {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean collocated() throws IgniteCheckedException {
+    @Override public boolean collocated() {
         return delegate.collocated();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java
index 923c32b..0456107 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java
@@ -193,7 +193,7 @@ public class GridTransactionalCacheQueueImpl<T> extends GridCacheQueueAdapter<T>
             return retVal;
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/datastructures/DataStructuresCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/datastructures/DataStructuresCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/datastructures/DataStructuresCommandHandler.java
index 0c60466..53491c4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/datastructures/DataStructuresCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/datastructures/DataStructuresCommandHandler.java
@@ -55,11 +55,11 @@ public class DataStructuresCommandHandler extends GridRestCommandHandlerAdapter
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteFuture<GridRestResponse> handleAsync(GridRestRequest req) {
+    @Override public IgniteInternalFuture<GridRestResponse> handleAsync(GridRestRequest req) {
         assert SUPPORTED_COMMANDS.contains(req.command()) : req.command();
 
-        return incrementOrDecrement((DataStructuresRequest)req).chain(new CX1<IgniteFuture<?>, GridRestResponse>() {
-            @Override public GridRestResponse applyx(IgniteFuture<?> fut) throws IgniteCheckedException {
+        return incrementOrDecrement((DataStructuresRequest)req).chain(new CX1<IgniteInternalFuture<?>, GridRestResponse>() {
+            @Override public GridRestResponse applyx(IgniteInternalFuture<?> fut) throws IgniteCheckedException {
                 GridRestResponse res = new GridRestResponse();
 
                 res.setResponse(fut.get());
@@ -74,7 +74,7 @@ public class DataStructuresCommandHandler extends GridRestCommandHandlerAdapter
      * @param req Request.
      * @return Future of operation result.
      */
-    private IgniteFuture<?> incrementOrDecrement(final DataStructuresRequest req) {
+    private IgniteInternalFuture<?> incrementOrDecrement(final DataStructuresRequest req) {
         assert req != null;
         assert req.command() == CACHE_INCREMENT || req.command() == CACHE_DECREMENT : req.command();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
index fe3bc54..d6f84cd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
@@ -613,7 +613,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
      */
     public void testFifoQueueTopologyChange() throws Exception {
         try {
-            grid(0).queue(STRUCTURE_NAME, collectionConfiguration(), 0, true).put(10);
+            grid(0).queue(STRUCTURE_NAME, config(false), 0, true).put(10);
 
             Ignite g = startGrid(NEW_GRID_NAME);
 
@@ -634,7 +634,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
      * @throws Exception If failed.
      */
     public void testQueueConstantTopologyChange() throws Exception {
-        try (IgniteQueue<Integer> s = grid(0).queue(STRUCTURE_NAME, collectionConfiguration(), 0, true)) {
+        try (IgniteQueue<Integer> s = grid(0).queue(STRUCTURE_NAME, config(false), 0, true)) {
             s.put(1);
 
             IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {
@@ -678,7 +678,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
      * @throws Exception If failed.
      */
     public void testQueueConstantMultipleTopologyChange() throws Exception {
-        try (IgniteQueue<Integer> s = grid(0).queue(STRUCTURE_NAME, collectionConfiguration(), 0, true)) {
+        try (IgniteQueue<Integer> s = grid(0).queue(STRUCTURE_NAME, config(false), 0, true)) {
             s.put(1);
 
             IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java
index 629be11..4f6436a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java
@@ -85,8 +85,8 @@ public abstract class GridCacheAbstractQueueFailoverDataConsistencySelfTest exte
     }
 
     /** {@inheritDoc} */
-    @Override protected IgniteCollectionConfiguration collectionConfiguration() {
-        IgniteCollectionConfiguration colCfg = super.collectionConfiguration();
+    @Override protected TestCollectionConfiguration collectionConfiguration() {
+        TestCollectionConfiguration colCfg = super.collectionConfiguration();
 
         colCfg.setBackups(1);
 
@@ -112,9 +112,7 @@ public abstract class GridCacheAbstractQueueFailoverDataConsistencySelfTest exte
      * @throws Exception If failed.
      */
     private void testAddFailover(boolean collocated) throws Exception {
-        IgniteCollectionConfiguration colCfg = collectionConfiguration();
-
-        colCfg.setCollocated(collocated);
+        IgniteCollectionConfiguration colCfg = config(collocated);
 
         IgniteQueue<Integer> queue = grid(0).queue(QUEUE_NAME, colCfg, 0,true);
 
@@ -209,9 +207,7 @@ public abstract class GridCacheAbstractQueueFailoverDataConsistencySelfTest exte
      * @throws Exception If failed.
      */
     private void testPollFailover(boolean collocated) throws Exception {
-        IgniteCollectionConfiguration colCfg = collectionConfiguration();
-
-        colCfg.setCollocated(collocated);
+        IgniteCollectionConfiguration colCfg = config(collocated);
 
         IgniteQueue<Integer> queue = grid(0).queue(QUEUE_NAME, colCfg, 0, true);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java
index 8eea62c..c31b979 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.internal.processors.cache.datastructures;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.datastructures.*;
+import org.apache.ignite.datastructures.*;
 
 import java.util.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java
index 0651a13..f254fcf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicStampedApiSelfAbstractTest.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.internal.processors.cache.datastructures;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.datastructures.*;
+import org.apache.ignite.datastructures.*;
 
 import java.util.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java
index 5e16dd5..de33315 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueApiSelfAbstractTest.java
@@ -50,7 +50,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection
         String queueName1 = UUID.randomUUID().toString();
         String queueName2 = UUID.randomUUID().toString();
 
-        IgniteCollectionConfiguration colCfg = collectionConfiguration();
+        IgniteCollectionConfiguration colCfg = config(false);
 
         IgniteQueue queue1 = grid(0).queue(queueName1, colCfg, 0, true);
         IgniteQueue queue2 = grid(0).queue(queueName2, colCfg, 0, true);
@@ -82,7 +82,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection
 
         String val = UUID.randomUUID().toString();
 
-        IgniteQueue<String> queue = grid(0).queue(queueName, collectionConfiguration(), 0, true);
+        IgniteQueue<String> queue = grid(0).queue(queueName, config(false), 0, true);
 
         assert queue.add(val);
 
@@ -100,7 +100,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection
 
         String val = UUID.randomUUID().toString();
 
-        IgniteQueue<String> queue = grid(0).queue(queueName, collectionConfiguration(), 0, true);
+        IgniteQueue<String> queue = grid(0).queue(queueName, config(false), 0, true);
 
         assert queue.add(val);
 
@@ -118,7 +118,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection
         // Random queue name.
         String queueName = UUID.randomUUID().toString();
 
-        IgniteQueue<SameHashItem> queue = grid(0).queue(queueName, collectionConfiguration(), 0, true);
+        IgniteQueue<SameHashItem> queue = grid(0).queue(queueName, config(false), 0, true);
 
         int retries = 100;
 
@@ -194,7 +194,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection
         // Random queue name.
         String queueName = UUID.randomUUID().toString();
 
-        IgniteQueue<String> queue = grid(0).queue(queueName, collectionConfiguration(), 0, true);
+        IgniteQueue<String> queue = grid(0).queue(queueName, config(false), 0, true);
 
         assert queue.add("1");
 
@@ -216,7 +216,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection
         // Random queue name.
         String queueName = UUID.randomUUID().toString();
 
-        IgniteQueue<String> queue = grid(0).queue(queueName, collocatedCollectionConfiguration(), 0, true);
+        IgniteQueue<String> queue = grid(0).queue(queueName, config(false), 0, true);
 
         String item1 = "1";
         assert queue.add(item1);
@@ -241,7 +241,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection
         // Random queue name.
         String queueName = UUID.randomUUID().toString();
 
-        IgniteQueue<String> queue = grid(0).queue(queueName, collectionConfiguration(), 0, true);
+        IgniteQueue<String> queue = grid(0).queue(queueName, config(false), 0, true);
 
         for (int i = 0; i < 100; i++)
             assert queue.add(Integer.toString(i));
@@ -297,7 +297,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection
         // Random queue name.
         String queueName = UUID.randomUUID().toString();
 
-        IgniteQueue<String> queue = grid(0).queue(queueName, collectionConfiguration(), QUEUE_CAPACITY, true);
+        IgniteQueue<String> queue = grid(0).queue(queueName, config(false), QUEUE_CAPACITY, true);
 
         String thName = Thread.currentThread().getName();
 
@@ -319,7 +319,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection
         // Random queue name.
         String queueName = UUID.randomUUID().toString();
 
-        final IgniteQueue<String> queue = grid(0).queue(queueName, collectionConfiguration(), QUEUE_CAPACITY, true);
+        final IgniteQueue<String> queue = grid(0).queue(queueName, config(false), QUEUE_CAPACITY, true);
 
         multithreaded(new Callable<Void>() {
                 @Override public Void call() throws Exception {
@@ -347,7 +347,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection
         // Random queue name.
         String queueName = UUID.randomUUID().toString();
 
-        final IgniteQueue<String> queue = grid(0).queue(queueName, collectionConfiguration(), QUEUE_CAPACITY, true);
+        final IgniteQueue<String> queue = grid(0).queue(queueName, config(false), QUEUE_CAPACITY, true);
 
         multithreaded(new Callable<String>() {
                 @Override public String call() throws Exception {
@@ -374,7 +374,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection
         // Random queue name.
         final String queueName = UUID.randomUUID().toString();
 
-        final IgniteQueue<String> queue = grid(0).queue(queueName, collectionConfiguration(), QUEUE_CAPACITY, true);
+        final IgniteQueue<String> queue = grid(0).queue(queueName, config(false), QUEUE_CAPACITY, true);
 
         final CountDownLatch putLatch = new CountDownLatch(THREAD_NUM);
 
@@ -454,7 +454,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection
         // Random queue name.
         String queueName = UUID.randomUUID().toString();
 
-        IgniteQueue<String> queue = grid(0).queue(queueName, collectionConfiguration(), 0, true);
+        IgniteQueue<String> queue = grid(0).queue(queueName, config(false), 0, true);
 
         String thread = Thread.currentThread().getName();
 
@@ -479,7 +479,7 @@ public abstract class GridCacheQueueApiSelfAbstractTest extends IgniteCollection
         // Random queue name.
         String queueName = UUID.randomUUID().toString();
 
-        final IgniteQueue<String> queue = grid(0).queue(queueName, collectionConfiguration(), 0, true);
+        final IgniteQueue<String> queue = grid(0).queue(queueName, config(false), 0, true);
 
         multithreaded(
             new Callable<String>() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
index 5661c00..f772bf3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
@@ -60,8 +60,8 @@ public class GridCacheQueueCleanupSelfTest extends IgniteCollectionAbstractTest
     }
 
     /** {@inheritDoc} */
-    @Override protected IgniteCollectionConfiguration collectionConfiguration() {
-        IgniteCollectionConfiguration colCfg = super.collectionConfiguration();
+    @Override protected TestCollectionConfiguration collectionConfiguration() {
+        TestCollectionConfiguration colCfg = super.collectionConfiguration();
 
         colCfg.setBackups(0);
 
@@ -72,7 +72,7 @@ public class GridCacheQueueCleanupSelfTest extends IgniteCollectionAbstractTest
      * @throws Exception If failed.
      */
     public void testCleanup() throws Exception {
-        IgniteQueue<Integer> queue = grid(0).queue(QUEUE_NAME1, collectionConfiguration(), 0, true);
+        IgniteQueue<Integer> queue = grid(0).queue(QUEUE_NAME1, config(false), 0, true);
 
         GridCacheContext cctx = GridTestUtils.getFieldValue(queue, "cctx");
 
@@ -161,7 +161,7 @@ public class GridCacheQueueCleanupSelfTest extends IgniteCollectionAbstractTest
         // Remove queue and create queue with the same name.
         queue.close();
 
-        queue = ignite.queue(QUEUE_NAME1, collectionConfiguration(), 0, true);
+        queue = ignite.queue(QUEUE_NAME1, config(false), 0, true);
 
         assertEquals(0, queue.size());
 
@@ -212,7 +212,7 @@ public class GridCacheQueueCleanupSelfTest extends IgniteCollectionAbstractTest
     private IgniteInternalFuture<?> startAddPollThread(final Ignite ignite, final AtomicBoolean stop, final String queueName) {
         return GridTestUtils.runAsync(new Callable<Void>() {
             @Override public Void call() throws Exception {
-                IgniteQueue<Integer> queue = ignite.queue(queueName, collectionConfiguration(), 0, true);
+                IgniteQueue<Integer> queue = ignite.queue(queueName, config(false), 0, true);
 
                 assertEquals(0, queue.size());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java
index 74f0892..e4e0811 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueJoinedNodeSelfAbstractTest.java
@@ -58,7 +58,7 @@ public abstract class GridCacheQueueJoinedNodeSelfAbstractTest extends IgniteCol
     public void testTakeFromJoined() throws Exception {
         String queueName = UUID.randomUUID().toString();
 
-        IgniteQueue<Integer> queue = grid(0).queue(queueName, collocatedCollectionConfiguration(), 0, true);
+        IgniteQueue<Integer> queue = grid(0).queue(queueName, config(true), 0, true);
 
         assertNotNull(queue);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
index bc7a037..bcdf274 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeAbstractSelfTest.java
@@ -121,7 +121,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
     public void testPut() throws Exception {
         String queueName = UUID.randomUUID().toString();
 
-        IgniteQueue<Integer> queue = grid(0).queue(queueName, collectionConfiguration(), QUEUE_CAPACITY, true);
+        IgniteQueue<Integer> queue = grid(0).queue(queueName, config(false), QUEUE_CAPACITY, true);
 
         assertTrue(queue.isEmpty());
 
@@ -139,7 +139,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
 
             info("Queue name: " + queueName);
 
-            grid(0).queue(queueName, collocatedCollectionConfiguration(), 5, true);
+            grid(0).queue(queueName, config(true), 5, true);
 
             final CountDownLatch latch = new CountDownLatch(1);
 
@@ -150,7 +150,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
                     info(">>> Executing put callable [node=" + g.cluster().localNode().id() +
                         ", thread=" + Thread.currentThread().getName() + ']');
 
-                    IgniteQueue<Integer> q = g.queue(queueName, collocatedCollectionConfiguration(), 5, true);
+                    IgniteQueue<Integer> q = g.queue(queueName, config(true), 5, true);
 
                     assertTrue(q.isEmpty());
 
@@ -181,7 +181,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
                         info(">>> Executing poll callable [node=" + g1.cluster().localNode().id() +
                             ", thread=" + Thread.currentThread().getName() + ']');
 
-                        IgniteQueue<Integer> q = g1.queue(queueName, collocatedCollectionConfiguration(), 5, true);
+                        IgniteQueue<Integer> q = g1.queue(queueName, config(true), 5, true);
 
                         int cnt = 0;
                         int nullCnt = 0;
@@ -242,7 +242,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
 
             info("Queue name: " + queueName);
 
-            IgniteQueue<Integer> queue = grid(0).queue(queueName, collectionConfiguration(), QUEUE_CAPACITY, true);
+            IgniteQueue<Integer> queue = grid(0).queue(queueName, config(false), QUEUE_CAPACITY, true);
 
             assertTrue(queue.isEmpty());
 
@@ -269,7 +269,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
 
         info("Queue name: " + queueName);
 
-        IgniteQueue<String> queue = grid(0).queue(queueName, collectionConfiguration(), QUEUE_CAPACITY, true);
+        IgniteQueue<String> queue = grid(0).queue(queueName, config(false), QUEUE_CAPACITY, true);
 
         assertTrue(queue.isEmpty());
 
@@ -277,7 +277,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
 
         queue.put(val);
 
-        grid(0).compute().call(new GetJob(queueName, collectionConfiguration(), RETRIES, val));
+        grid(0).compute().call(new GetJob(queueName, config(false), RETRIES, val));
 
         assertEquals(1, queue.size());
 
@@ -292,7 +292,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
 
         info("Queue name: " + queueName);
 
-        IgniteQueue<Integer> queue = grid(0).queue(queueName, collectionConfiguration(), QUEUE_CAPACITY, true);
+        IgniteQueue<Integer> queue = grid(0).queue(queueName, config(false), QUEUE_CAPACITY, true);
 
         assertTrue(queue.isEmpty());
 
@@ -332,9 +332,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
 
                 futs.add(GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
                     @Override public Void call() throws Exception {
-                        IgniteCollectionConfiguration colCfg = collectionConfiguration();
-
-                        colCfg.setCollocated(collocated);
+                        IgniteCollectionConfiguration colCfg = config(collocated);
 
                         IgniteQueue<Integer> queue = grid(idx).queue(queueName, colCfg, 0, true);
 
@@ -403,9 +401,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
 
                 putFuts.add(GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
                     @Override public Void call() throws Exception {
-                        IgniteCollectionConfiguration colCfg = collectionConfiguration();
-
-                        colCfg.setCollocated(collocated);
+                        IgniteCollectionConfiguration colCfg = config(collocated);
 
                         IgniteQueue<Integer> queue = grid(idx).queue(queueName, colCfg, 0, true);
 
@@ -423,9 +419,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
 
                     pollFuts.add(GridTestUtils.runAsync(new Callable<Void>() {
                         @Override public Void call() throws Exception {
-                            IgniteCollectionConfiguration colCfg = collectionConfiguration();
-
-                            colCfg.setCollocated(collocated);
+                            IgniteCollectionConfiguration colCfg = config(collocated);
 
                             IgniteQueue<Integer> queue = grid(idx).queue(queueName, colCfg, 0, true);
 
@@ -450,9 +444,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
             for (IgniteInternalFuture fut : pollFuts)
                 fut.get();
 
-            IgniteCollectionConfiguration colCfg = collectionConfiguration();
-
-            colCfg.setCollocated(collocated);
+            IgniteCollectionConfiguration colCfg = config(collocated);
 
             IgniteQueue<Integer> queue = grid(0).queue(queueName, colCfg, 0, true);
 
@@ -487,7 +479,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
 
         info("Queue name: " + queueName);
 
-        try (IgniteQueue<Integer> queue = grid(0).queue(queueName, collectionConfiguration(), QUEUE_CAPACITY, true)) {
+        try (IgniteQueue<Integer> queue = grid(0).queue(queueName, config(false), QUEUE_CAPACITY, true)) {
             assertTrue(queue.isEmpty());
 
             grid(0).compute().call(new AddAllJob(queueName, RETRIES));
@@ -532,7 +524,7 @@ public abstract class GridCacheQueueMultiNodeAbstractSelfTest extends IgniteColl
         // Random queue name.
         String queueName = UUID.randomUUID().toString();
 
-        final IgniteQueue<Integer> queue = grid(0).queue(queueName, collectionConfiguration(), 0, true);
+        final IgniteQueue<Integer> queue = grid(0).queue(queueName, config(false), 0, true);
 
         assertNotNull(queue);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
index d6e4d94..24ceff9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
@@ -73,8 +73,8 @@ public class GridCacheQueueMultiNodeConsistencySelfTest extends IgniteCollection
     }
 
     /** {@inheritDoc} */
-    @Override protected IgniteCollectionConfiguration collectionConfiguration() {
-        IgniteCollectionConfiguration colCfg = super.collectionConfiguration();
+    @Override protected TestCollectionConfiguration collectionConfiguration() {
+        TestCollectionConfiguration colCfg = super.collectionConfiguration();
 
         colCfg.setBackups(backups);
 
@@ -137,7 +137,7 @@ public class GridCacheQueueMultiNodeConsistencySelfTest extends IgniteCollection
 
         final String queueName = UUID.randomUUID().toString();
 
-        IgniteQueue<Integer> queue0 = grid(0).queue(queueName, collectionConfiguration(), QUEUE_CAPACITY, true);
+        IgniteQueue<Integer> queue0 = grid(0).queue(queueName, config(false), QUEUE_CAPACITY, true);
 
         assertTrue(queue0.isEmpty());
 
@@ -168,7 +168,7 @@ public class GridCacheQueueMultiNodeConsistencySelfTest extends IgniteCollection
 
                 grid.log().info("Running job [node=" + grid.cluster().localNode().id() + ", job=" + this + "]");
 
-                IgniteQueue<Integer> locQueue = grid.queue(queueName, collectionConfiguration(), QUEUE_CAPACITY, true);
+                IgniteQueue<Integer> locQueue = grid.queue(queueName, config(false), QUEUE_CAPACITY, true);
 
                 grid.log().info("Queue size " + locQueue.size());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java
index 847ffe1..000d89e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueRotativeMultiNodeAbstractTest.java
@@ -18,8 +18,8 @@
 package org.apache.ignite.internal.processors.cache.datastructures;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.datastructures.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.datastructures.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -90,7 +90,7 @@ public abstract class GridCacheQueueRotativeMultiNodeAbstractTest extends Ignite
         String queueName = UUID.randomUUID().toString();
 
         IgniteQueue<Integer> queue =
-            grid(0).queue(queueName, collocatedCollectionConfiguration(), QUEUE_CAPACITY, true);
+            grid(0).queue(queueName, config(true), QUEUE_CAPACITY, true);
 
         assertTrue(queue.isEmpty());
 
@@ -98,7 +98,7 @@ public abstract class GridCacheQueueRotativeMultiNodeAbstractTest extends Ignite
         for (int i = GRID_CNT; i < GRID_CNT * 3; i++) {
             startGrid(i);
 
-            forLocal(grid(i)).call(new PutJob(queueName, collocatedCollectionConfiguration(), RETRIES));
+            forLocal(grid(i)).call(new PutJob(queueName, config(true), RETRIES));
 
             // last node must be alive.
             if (i < (GRID_CNT * 3) - 1)
@@ -119,7 +119,7 @@ public abstract class GridCacheQueueRotativeMultiNodeAbstractTest extends Ignite
         String queueName = UUID.randomUUID().toString();
 
         IgniteQueue<Integer> queue =
-                grid(0).queue(queueName, collocatedCollectionConfiguration(), QUEUE_CAPACITY, true);
+                grid(0).queue(queueName, config(true), QUEUE_CAPACITY, true);
 
         assertTrue(queue.isEmpty());
 
@@ -127,14 +127,14 @@ public abstract class GridCacheQueueRotativeMultiNodeAbstractTest extends Ignite
         for (int i = GRID_CNT; i < GRID_CNT * 3; i++) {
             startGrid(i);
 
-            forLocal(grid(i)).call(new PutTakeJob(queueName, collocatedCollectionConfiguration(), RETRIES));
+            forLocal(grid(i)).call(new PutTakeJob(queueName, config(true), RETRIES));
 
             // last node must be alive.
             if (i < (GRID_CNT * 3) - 1)
                 stopGrid(i);
         }
 
-        queue = grid((GRID_CNT * 3) - 1).queue(queueName, collocatedCollectionConfiguration(), QUEUE_CAPACITY, true);
+        queue = grid((GRID_CNT * 3) - 1).queue(queueName, config(true), QUEUE_CAPACITY, true);
 
         assertEquals(0, queue.size());
     }
@@ -150,14 +150,14 @@ public abstract class GridCacheQueueRotativeMultiNodeAbstractTest extends Ignite
         final String queueName = UUID.randomUUID().toString();
 
         final IgniteQueue<Integer> queue =
-                grid(0).queue(queueName, collocatedCollectionConfiguration(), QUEUE_CAPACITY, true);
+                grid(0).queue(queueName, config(true), QUEUE_CAPACITY, true);
 
         assertTrue(queue.isEmpty());
 
         Thread th = new Thread(new Runnable() {
             @Override public void run() {
                 try {
-                    assert grid(1).compute().call(new TakeJob(queueName, collocatedCollectionConfiguration()));
+                    assert grid(1).compute().call(new TakeJob(queueName, config(true)));
                 }
                 catch (IgniteException e) {
                     error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java
index 2195f24..8867a5a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSequenceApiSelfAbstractTest.java
@@ -19,8 +19,9 @@ package org.apache.ignite.internal.processors.cache.datastructures;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.datastructures.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.datastructures.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.datastructures.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -135,7 +136,7 @@ public abstract class GridCacheSequenceApiSelfAbstractTest extends IgniteAtomics
     }
 
     /** {@inheritDoc} */
-    protected GridEx grid() {
+    protected IgniteEx grid() {
         return grid(0);
     }
 
@@ -316,7 +317,7 @@ public abstract class GridCacheSequenceApiSelfAbstractTest extends IgniteAtomics
 
         locSeq.addAndGet(153);
 
-        GridCacheAdapter cache = ((GridKernal)grid()).internalCache(GridCacheUtils.ATOMICS_CACHE_NAME);
+        GridCacheAdapter cache = ((IgniteKernal)grid()).internalCache(GridCacheUtils.ATOMICS_CACHE_NAME);
 
         assertNotNull(cache);
 
@@ -356,7 +357,7 @@ public abstract class GridCacheSequenceApiSelfAbstractTest extends IgniteAtomics
 
         seq.incrementAndGet();
 
-        GridCacheAdapter cache = ((GridKernal)grid()).internalCache(GridCacheUtils.ATOMICS_CACHE_NAME);
+        GridCacheAdapter cache = ((IgniteKernal)grid()).internalCache(GridCacheUtils.ATOMICS_CACHE_NAME);
 
         assertNotNull(cache);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
index abb9c71..d4c907e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
@@ -20,8 +20,8 @@ package org.apache.ignite.internal.processors.cache.datastructures;
 import junit.framework.*;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.datastructures.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.datastructures.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.util.lang.*;
@@ -58,8 +58,8 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
     }
 
     /** {@inheritDoc} */
-    @Override protected IgniteCollectionConfiguration collectionConfiguration() {
-        IgniteCollectionConfiguration colCfg = super.collectionConfiguration();
+    @Override protected TestCollectionConfiguration collectionConfiguration() {
+        TestCollectionConfiguration colCfg = super.collectionConfiguration();
 
         if (colCfg.getCacheMode() == PARTITIONED)
             colCfg.setBackups(1);
@@ -177,18 +177,14 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
         for (int i = 0; i < gridCount(); i++)
             assertNull(grid(i).set(SET_NAME, null, false));
 
-        IgniteCollectionConfiguration colCfg0 = collectionConfiguration();
-
-        colCfg0.setCollocated(collocated);
+        IgniteCollectionConfiguration colCfg0 = config(collocated);
 
         IgniteSet<Integer> set0 = grid(0).set(SET_NAME, colCfg0, true);
 
         assertNotNull(set0);
 
         for (int i = 0; i < gridCount(); i++) {
-            IgniteCollectionConfiguration colCfg = collectionConfiguration();
-
-            colCfg.setCollocated(collocated);
+            IgniteCollectionConfiguration colCfg = config(collocated);
 
             IgniteSet<Integer> set = grid(i).set(SET_NAME, colCfg, true);
 
@@ -245,9 +241,7 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
      * @throws Exception If failed.
      */
     private void testApi(boolean collocated) throws Exception {
-        IgniteCollectionConfiguration colCfg = collectionConfiguration();
-
-        colCfg.setCollocated(collocated);
+        IgniteCollectionConfiguration colCfg = config(collocated);
 
         assertNotNull(grid(0).set(SET_NAME, colCfg, true));
 
@@ -411,9 +405,7 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
      */
     @SuppressWarnings("deprecation")
     private void testIterator(boolean collocated) throws Exception {
-        IgniteCollectionConfiguration colCfg = collectionConfiguration();
-
-        colCfg.setCollocated(collocated);
+        IgniteCollectionConfiguration colCfg = config(collocated);
 
         final IgniteSet<Integer> set0 = grid(0).set(SET_NAME, colCfg, true);
 
@@ -505,9 +497,7 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
      */
     @SuppressWarnings({"BusyWait", "ErrorNotRethrown"})
     private void testIteratorClose(boolean collocated) throws Exception {
-        IgniteCollectionConfiguration colCfg = collectionConfiguration();
-
-        colCfg.setCollocated(collocated);
+        IgniteCollectionConfiguration colCfg = config(collocated);
 
         IgniteSet<Integer> set0 = grid(0).set(SET_NAME, colCfg, true);
 
@@ -598,9 +588,7 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
         if (collectionCacheMode() == LOCAL)
             return;
 
-        IgniteCollectionConfiguration colCfg = collectionConfiguration();
-
-        colCfg.setCollocated(collocated);
+        IgniteCollectionConfiguration colCfg = config(collocated);
 
         Set<Integer> set0 = grid(0).set(SET_NAME, colCfg, true);
 
@@ -657,9 +645,7 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
      * @throws Exception If failed.
      */
     private void testMultithreaded(final boolean collocated) throws Exception {
-        IgniteCollectionConfiguration colCfg = collectionConfiguration();
-
-        colCfg.setCollocated(collocated);
+        IgniteCollectionConfiguration colCfg = config(collocated);
 
         Set<Integer> set0 = grid(0).set(SET_NAME, colCfg, true);
 
@@ -743,9 +729,7 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
      */
     @SuppressWarnings("WhileLoopReplaceableByForEach")
     private void testCleanup(boolean collocated) throws Exception {
-        IgniteCollectionConfiguration colCfg = collectionConfiguration();
-
-        colCfg.setCollocated(collocated);
+        IgniteCollectionConfiguration colCfg = config(collocated);
 
         final IgniteSet<Integer> set0 = grid(0).set(SET_NAME, colCfg, true);
 
@@ -837,7 +821,7 @@ public abstract class GridCacheSetAbstractSelfTest extends IgniteCollectionAbstr
      * @throws Exception If failed.
      */
     public void testSerialization() throws Exception {
-        final IgniteSet<Integer> set = grid(0).set(SET_NAME, collectionConfiguration(), true);
+        final IgniteSet<Integer> set = grid(0).set(SET_NAME, config(false), true);
 
         assertNotNull(set);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
index 92100e3..ef7595c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetFailoverAbstractSelfTest.java
@@ -82,7 +82,7 @@ public abstract class GridCacheSetFailoverAbstractSelfTest extends IgniteCollect
      */
     @SuppressWarnings("WhileLoopReplaceableByForEach")
     public void testNodeRestart() throws Exception {
-        IgniteSet<Integer> set = grid(0).set(SET_NAME, collectionConfiguration(), true);
+        IgniteSet<Integer> set = grid(0).set(SET_NAME, config(false), true);
 
         final int ITEMS = 10_000;
 
@@ -149,7 +149,7 @@ public abstract class GridCacheSetFailoverAbstractSelfTest extends IgniteCollect
 
                 log.info("Create new set.");
 
-                set = grid(0).set(SET_NAME, collectionConfiguration(), true);
+                set = grid(0).set(SET_NAME, config(false), true);
 
                 set.addAll(items);
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java
index f24d4fb..450a061 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteAtomicLongApiAbstractSelfTest.java
@@ -19,8 +19,8 @@ package org.apache.ignite.internal.processors.cache.datastructures;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.datastructures.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.datastructures.*;
 import org.apache.ignite.transactions.*;
 
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/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 0f8429e..e6ff8f1 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
@@ -25,7 +25,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.testframework.junits.common.*;
 
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.*;
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
 import static org.apache.ignite.cache.CacheDistributionMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 import static org.apache.ignite.cache.CachePreloadMode.*;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
@@ -37,6 +39,9 @@ public abstract class IgniteCollectionAbstractTest extends GridCommonAbstractTes
     /** */
     protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
 
+    /** */
+    private static final String COL_CACHE_NAME = "TEST_COLLECTION_CACHE";
+
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
@@ -47,14 +52,14 @@ public abstract class IgniteCollectionAbstractTest extends GridCommonAbstractTes
 
         cfg.setDiscoverySpi(spi);
 
-        // TODO IGNITE-29: remove cache configuration when dynamic cache start is implemented.
-        IgniteCollectionConfiguration colCfg = collectionConfiguration();
+        // TODO IGNITE-45: remove cache configuration when dynamic cache start is implemented.
+        TestCollectionConfiguration colCfg = collectionConfiguration();
 
         assertNotNull(colCfg);
 
         CacheConfiguration ccfg = new CacheConfiguration();
 
-        ccfg.setName("TEST_COLLECTION_CACHE");
+        ccfg.setName(COL_CACHE_NAME);
         ccfg.setCacheMode(colCfg.getCacheMode());
         ccfg.setAtomicityMode(colCfg.getAtomicityMode());
         ccfg.setAtomicWriteOrderMode(PRIMARY);
@@ -70,28 +75,30 @@ public abstract class IgniteCollectionAbstractTest extends GridCommonAbstractTes
     }
 
     /**
+     * @param collocated Collocated flag.
      * @return Collection configuration.
      */
-    protected IgniteCollectionConfiguration collectionConfiguration() {
-        IgniteCollectionConfiguration colCfg = new IgniteCollectionConfiguration();
+    protected final IgniteCollectionConfiguration config(boolean collocated) {
+        IgniteCollectionConfiguration cfg = new IgniteCollectionConfiguration();
 
-        colCfg.setCacheMode(collectionCacheMode());
-        colCfg.setAtomicityMode(collectionCacheAtomicityMode());
-        colCfg.setDistributionMode(PARTITIONED_ONLY);
+        cfg.setCacheName(COL_CACHE_NAME);
+        cfg.setCollocated(collocated);
 
-        if (colCfg.getCacheMode() == PARTITIONED)
-            colCfg.setBackups(1);
-
-        return colCfg;
+        return cfg;
     }
 
     /**
-     * @return Collection configuration with {@link IgniteCollectionConfiguration#isCollocated()} flag set.
+     * @return Collection configuration.
      */
-    protected final IgniteCollectionConfiguration collocatedCollectionConfiguration() {
-        IgniteCollectionConfiguration colCfg = collectionConfiguration();
+    protected TestCollectionConfiguration collectionConfiguration() {
+        TestCollectionConfiguration colCfg = new TestCollectionConfiguration();
 
-        colCfg.setCollocated(true);
+        colCfg.setCacheMode(collectionCacheMode());
+        colCfg.setAtomicityMode(collectionCacheAtomicityMode());
+        colCfg.setDistributionMode(PARTITIONED_ONLY);
+
+        if (colCfg.getCacheMode() == PARTITIONED)
+            colCfg.setBackups(1);
 
         return colCfg;
     }
@@ -120,4 +127,129 @@ public abstract class IgniteCollectionAbstractTest extends GridCommonAbstractTes
     @Override protected void afterTestsStopped() throws Exception {
         stopAllGrids();
     }
+
+    /**
+     * TODO IGNITE-45: move properties to IgniteCollectionConfiguration.
+     */
+    public static class TestCollectionConfiguration {
+        /** Default backups number. */
+        public static final int DFLT_BACKUPS = 0;
+
+        /** Default cache mode. */
+        public static final CacheMode DFLT_CACHE_MODE = PARTITIONED;
+
+        /** Default atomicity mode. */
+        public static final CacheAtomicityMode DFLT_ATOMICITY_MODE = ATOMIC;
+
+        /** Default memory mode. */
+        public static final CacheMemoryMode DFLT_MEMORY_MODE = ONHEAP_TIERED;
+
+        /** Default distribution mode. */
+        public static final CacheDistributionMode DFLT_DISTRIBUTION_MODE = PARTITIONED_ONLY;
+
+        /** Default off-heap storage size is {@code -1} which means that off-heap storage is disabled. */
+        public static final long DFLT_OFFHEAP_MEMORY = -1;
+
+        /** Off-heap memory size. */
+        private long offHeapMaxMem = DFLT_OFFHEAP_MEMORY;
+
+        /** Cache mode. */
+        private CacheMode cacheMode = DFLT_CACHE_MODE;
+
+        /** Cache distribution mode. */
+        private CacheDistributionMode distro = DFLT_DISTRIBUTION_MODE;
+
+        /** Number of backups. */
+        private int backups = DFLT_BACKUPS;
+
+        /** Atomicity mode. */
+        private CacheAtomicityMode atomicityMode = DFLT_ATOMICITY_MODE;
+
+        /** Memory mode. */
+        private CacheMemoryMode memMode = DFLT_MEMORY_MODE;
+
+        /**
+         * @return Number of cache backups.
+         */
+        public int getBackups() {
+            return backups;
+        }
+
+        /**
+         * @param backups Number of cache backups.
+         */
+        public void setBackups(int backups) {
+            this.backups = backups;
+        }
+
+        /**
+         * @return Cache mode.
+         */
+        public CacheMode getCacheMode() {
+            return cacheMode;
+        }
+
+        /**
+         * @param cacheMode Cache mode.
+         */
+        public void setCacheMode(CacheMode cacheMode) {
+            this.cacheMode = cacheMode;
+        }
+
+        /**
+         * @return Cache atomicity mode.
+         */
+        public CacheAtomicityMode getAtomicityMode() {
+            return atomicityMode;
+        }
+
+        /**
+         * @param atomicityMode Cache atomicity mode.
+         */
+        public void setAtomicityMode(CacheAtomicityMode atomicityMode) {
+            this.atomicityMode = atomicityMode;
+        }
+
+        /**
+         * @return Cache memory mode.
+         */
+        public CacheMemoryMode getMemoryMode() {
+            return memMode;
+        }
+
+        /**
+         * @param memMode Cache memory mode.
+         */
+        public void setMemoryMode(CacheMemoryMode memMode) {
+            this.memMode = memMode;
+        }
+
+        /**
+         * @return Cache distribution mode.
+         */
+        public CacheDistributionMode getDistributionMode() {
+            return distro;
+        }
+
+        /**
+         * @param distro Cache distribution mode.
+         */
+        public void setDistributionMode(CacheDistributionMode distro) {
+            this.distro = distro;
+        }
+
+        /**
+         * @param offHeapMaxMem Maximum memory in bytes available to off-heap memory space.
+         */
+        public void setOffHeapMaxMemory(long offHeapMaxMem) {
+            this.offHeapMaxMem = offHeapMaxMem;
+        }
+
+        /**
+         * @return Maximum memory in bytes available to off-heap memory space.
+         */
+        public long getOffHeapMaxMemory() {
+            return offHeapMaxMem;
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java
index 2a936dd..518c22d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java
@@ -84,7 +84,7 @@ public abstract class IgniteCountDownLatchAbstractSelfTest extends IgniteAtomics
 
             @Nullable @Override public Object call() throws Exception {
                 // Test latch in multiple threads on each node.
-                IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(
+                IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(
                     new Callable<Object>() {
                         @Nullable @Override public Object call() throws Exception {
                             IgniteCountDownLatch latch = ignite.countDownLatch("latch", 2, false, true);
@@ -253,7 +253,7 @@ public abstract class IgniteCountDownLatchAbstractSelfTest extends IgniteAtomics
 
         // Ensure latch is removed on all nodes.
         for (Ignite g : G.allGrids())
-            assertNull(((GridKernal)g).context().dataStructures().countDownLatch(latchName, 10, true, false));
+            assertNull(((IgniteKernal)g).context().dataStructures().countDownLatch(latchName, 10, true, false));
 
         checkRemovedLatch(latch);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/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 0e56f36..b625989 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
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache.datastructures;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.testframework.*;
 
@@ -68,12 +69,12 @@ public class IgniteDataStructureUniqueNameTest extends IgniteAtomicsAbstractTest
         for (int iter = 0; iter < 10; iter++) {
             log.info("Iteration: " + iter);
 
-            List<IgniteFuture<Object>> futs = new ArrayList<>(THREADS);
+            List<IgniteInternalFuture<Object>> futs = new ArrayList<>(THREADS);
 
             for (int i = 0; i < THREADS; i++) {
                 final int idx = i;
 
-                IgniteFuture<Object> fut = GridTestUtils.runAsync(new Callable<Object>() {
+                IgniteInternalFuture<Object> fut = GridTestUtils.runAsync(new Callable<Object>() {
                     @Override public Object call() throws Exception {
                         try {
                             Ignite ignite = singleGrid ? ignite(0) : ignite(idx % gridCount());
@@ -123,7 +124,7 @@ public class IgniteDataStructureUniqueNameTest extends IgniteAtomicsAbstractTest
 
             Closeable dataStructure = null;
 
-            for (IgniteFuture<Object> fut : futs) {
+            for (IgniteInternalFuture<Object> fut : futs) {
                 Object res = fut.get();
 
                 if (res instanceof IgniteException)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64645f61/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalCountDownLatchSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalCountDownLatchSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalCountDownLatchSelfTest.java
index 5e6a0f7..eca5557 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalCountDownLatchSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/IgniteLocalCountDownLatchSelfTest.java
@@ -19,8 +19,8 @@ package org.apache.ignite.internal.processors.cache.datastructures.local;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
-import org.apache.ignite.lang.*;
 import org.apache.ignite.testframework.*;
 import org.jetbrains.annotations.*;
 
@@ -52,7 +52,7 @@ public class IgniteLocalCountDownLatchSelfTest extends IgniteCountDownLatchAbstr
 
         assertEquals(2, latch.count());
 
-        IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(
+        IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(
             new Callable<Object>() {
                 @Nullable @Override public Object call() throws Exception {
                     IgniteCountDownLatch latch = grid(0).countDownLatch("latch", 2, false, true);


Mime
View raw message