ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # ignite-26
Date Tue, 03 Feb 2015 14:03:02 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-6 479764d92 -> 368dd6375


# ignite-26


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

Branch: refs/heads/ignite-6
Commit: 368dd6375f92f9c9697fbd6b738638470613a8ad
Parents: 479764d
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Feb 3 17:02:52 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Feb 3 17:02:52 2015 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/Ignite.java |  28 +-
 .../apache/ignite/internal/IgniteKernal.java    |  31 +-
 .../CacheDataStructuresProcessor.java           | 375 ++++++++++++++++++-
 .../testframework/junits/GridTestIgnite.java    |   2 -
 .../org/apache/ignite/IgniteSpringBean.java     |  12 +-
 5 files changed, 406 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/368dd637/modules/core/src/main/java/org/apache/ignite/Ignite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/Ignite.java b/modules/core/src/main/java/org/apache/ignite/Ignite.java
index c1f49d4..927ff67 100644
--- a/modules/core/src/main/java/org/apache/ignite/Ignite.java
+++ b/modules/core/src/main/java/org/apache/ignite/Ignite.java
@@ -308,10 +308,10 @@ public interface Ignite extends AutoCloseable {
      * @param initVal Initial value for sequence. If sequence already cached, {@code initVal}
will be ignored.
      * @param create Boolean flag indicating whether data structure should be created if
does not exist.
      * @return Sequence for the given name.
-     * @throws IgniteCheckedException If sequence could not be fetched or created.
+     * @throws IgniteException If sequence could not be fetched or created.
      */
     @Nullable public IgniteAtomicSequence atomicSequence(String name, long initVal, boolean
create)
-        throws IgniteCheckedException;
+        throws IgniteException;
 
     /**
      * Will get a atomic long from cache and create one if it has not been created yet and
{@code create} flag
@@ -322,10 +322,10 @@ public interface Ignite extends AutoCloseable {
      *        will be ignored.
      * @param create Boolean flag indicating whether data structure should be created if
does not exist.
      * @return Atomic long.
-     * @throws IgniteCheckedException If atomic long could not be fetched or created.
+     * @throws IgniteException If atomic long could not be fetched or created.
      */
     @Nullable public IgniteAtomicLong atomicLong(String name, long initVal, boolean create)
-        throws IgniteCheckedException;
+        throws IgniteException;
 
     /**
      * Will get a atomic reference from cache and create one if it has not been created yet
and {@code create} flag
@@ -336,10 +336,10 @@ public interface Ignite extends AutoCloseable {
      *      {@code initVal} will be ignored.
      * @param create Boolean flag indicating whether data structure should be created if
does not exist.
      * @return Atomic reference for the given name.
-     * @throws IgniteCheckedException If atomic reference could not be fetched or created.
+     * @throws IgniteException If atomic reference could not be fetched or created.
      */
     @Nullable public <T> IgniteAtomicReference<T> atomicReference(String name,
@Nullable T initVal, boolean create)
-        throws IgniteCheckedException;
+        throws IgniteException;
 
     /**
      * Will get a atomic stamped from cache and create one if it has not been created yet
and {@code create} flag
@@ -352,10 +352,10 @@ public interface Ignite extends AutoCloseable {
      *      {@code initStamp} will be ignored.
      * @param create Boolean flag indicating whether data structure should be created if
does not exist.
      * @return Atomic stamped for the given name.
-     * @throws IgniteCheckedException If atomic stamped could not be fetched or created.
+     * @throws IgniteException If atomic stamped could not be fetched or created.
      */
     @Nullable public <T, S> IgniteAtomicStamped<T, S> atomicStamped(String name,
@Nullable T initVal,
-        @Nullable S initStamp, boolean create) throws IgniteCheckedException;
+        @Nullable S initStamp, boolean create) throws IgniteException;
 
     /**
      * Gets or creates count down latch. If count down latch is not found in cache and {@code
create} flag
@@ -367,10 +367,10 @@ public interface Ignite extends AutoCloseable {
      *      when its count reaches zero.
      * @param create Boolean flag indicating whether data structure should be created if
does not exist.
      * @return Count down latch for the given name.
-     * @throws IgniteCheckedException If operation failed.
+     * @throws IgniteException If latch could not be fetched or created.
      */
     @Nullable public IgniteCountDownLatch countDownLatch(String name, int cnt, boolean autoDel,
boolean create)
-        throws IgniteCheckedException;
+        throws IgniteException;
 
     /**
      * Will get a named queue from cache and create one if it has not been created yet and
{@code create} flag
@@ -387,13 +387,13 @@ public interface Ignite extends AutoCloseable {
      * @param cap Capacity of queue, {@code 0} for unbounded queue.
      * @param create Boolean flag indicating whether data structure should be created if
does not exist.
      * @return Queue with given properties.
-     * @throws IgniteCheckedException If remove failed.
+     * @throws IgniteException If queue could not be fetched or created.
      */
     @Nullable public <T> IgniteQueue<T> queue(String name,
         IgniteCollectionConfiguration cfg,
         int cap,
         boolean create)
-        throws IgniteCheckedException;
+        throws IgniteException;
 
     /**
      * Will get a named set from cache and create one if it has not been created yet and
{@code create} flag
@@ -403,12 +403,12 @@ public interface Ignite extends AutoCloseable {
      * @param cfg Set configuration.
      * @param create Flag indicating whether set should be created if does not exist.
      * @return Set with given properties.
-     * @throws IgniteCheckedException If failed.
+     * @throws IgniteException If set could not be fetched or created.
      */
     @Nullable public <T> IgniteSet<T> set(String name,
         IgniteCollectionConfiguration cfg,
         boolean create)
-        throws IgniteCheckedException;
+        throws IgniteException;
 
     /**
      * Gets an instance of deployed Ignite plugin.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/368dd637/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 4240cb1..0243979 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -3278,15 +3278,14 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx,
Ignit
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public IgniteAtomicSequence atomicSequence(String name, long initVal,
boolean create)
-        throws IgniteCheckedException {
+    @Nullable @Override public IgniteAtomicSequence atomicSequence(String name, long initVal,
boolean create) {
         guard();
 
         try {
             return ctx.dataStructures().sequence(name, initVal, create);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             unguard();
@@ -3294,15 +3293,14 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx,
Ignit
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public IgniteAtomicLong atomicLong(String name, long initVal, boolean
create)
-        throws IgniteCheckedException {
+    @Nullable @Override public IgniteAtomicLong atomicLong(String name, long initVal, boolean
create) {
         guard();
 
         try {
             return ctx.dataStructures().atomicLong(name, initVal, create);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             unguard();
@@ -3313,14 +3311,14 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx,
Ignit
     @Nullable @Override public <T> IgniteAtomicReference<T> atomicReference(String
name,
         @Nullable T initVal,
         boolean create)
-        throws IgniteCheckedException {
+    {
         guard();
 
         try {
             return ctx.dataStructures().atomicReference(name, initVal, create);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             unguard();
@@ -3331,14 +3329,15 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx,
Ignit
     @Nullable @Override public <T, S> IgniteAtomicStamped<T, S> atomicStamped(String
name,
         @Nullable T initVal,
         @Nullable S initStamp,
-        boolean create) throws IgniteCheckedException {
+        boolean create)
+    {
         guard();
 
         try {
             return ctx.dataStructures().atomicStamped(name, initVal, initStamp, create);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             unguard();
@@ -3349,14 +3348,15 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx,
Ignit
     @Nullable @Override public IgniteCountDownLatch countDownLatch(String name,
         int cnt,
         boolean autoDel,
-        boolean create) throws IgniteCheckedException {
+        boolean create)
+    {
         guard();
 
         try {
             return ctx.dataStructures().countDownLatch(name, cnt, autoDel, create);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             unguard();
@@ -3367,7 +3367,7 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx,
Ignit
     @Nullable @Override public <T> IgniteQueue<T> queue(String name,
         IgniteCollectionConfiguration cfg,
         int cap,
-        boolean create) throws IgniteCheckedException
+        boolean create)
     {
         guard();
 
@@ -3375,7 +3375,7 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx,
Ignit
             return ctx.dataStructures().queue(name, cfg, cap, create);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             unguard();
@@ -3386,7 +3386,6 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx,
Ignit
     @Nullable @Override public <T> IgniteSet<T> set(String name,
         IgniteCollectionConfiguration cfg,
         boolean create)
-        throws IgniteCheckedException
     {
         guard();
 
@@ -3394,7 +3393,7 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx,
Ignit
             return ctx.dataStructures().set(name, cfg, create);
         }
         catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
+            throw U.convertException(e);
         }
         finally {
             unguard();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/368dd637/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CacheDataStructuresProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CacheDataStructuresProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CacheDataStructuresProcessor.java
index bcf195a..9704fad 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CacheDataStructuresProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CacheDataStructuresProcessor.java
@@ -31,6 +31,8 @@ import org.apache.ignite.internal.util.typedef.internal.*;
 import org.jdk8.backport.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.processor.*;
+import java.io.*;
 import java.util.*;
 import java.util.concurrent.*;
 
@@ -83,6 +85,9 @@ public final class CacheDataStructuresProcessor extends GridProcessorAdapter
{
     /** Atomic data structures configuration. */
     private final IgniteAtomicConfiguration atomicCfg;
 
+    /** */
+    private GridCache<CacheDataStructuresConfigurationKey, Map<String, DataStructureInfo>>
utilityCache;
+
     /**
      * @param ctx Context.
      */
@@ -100,6 +105,10 @@ public final class CacheDataStructuresProcessor extends GridProcessorAdapter
{
         if (ctx.config().isDaemon())
             return;
 
+        utilityCache = ctx.cache().utilityCache();
+
+        assert utilityCache != null;
+
         if (atomicCfg != null) {
             GridCache atomicsCache = ctx.cache().atomicsCache();
 
@@ -596,6 +605,48 @@ public final class CacheDataStructuresProcessor extends GridProcessorAdapter
{
 
             if (cap <= 0)
                 cap = Integer.MAX_VALUE;
+
+            if (ctx.cache().publicCache(cfg.getCacheName()) == null)
+                throw new IgniteCheckedException("Cache for collection is not configured:
" + cfg.getCacheName());
+        }
+
+        Map<String, DataStructureInfo> dsMap = utilityCache.get(DATA_STRUCTURES_KEY);
+
+        if (!create && (dsMap == null || !dsMap.containsKey(name)))
+            return null;
+
+        DataStructureInfo dsInfo = new DataStructureInfo(name,
+            DataStructureType.QUEUE,
+            create ? new QueueInfo(cfg.isCollocated(), cap, cfg.getCacheName()) : null);
+
+        IgniteCheckedException err = validateDataStructure(utilityCache.get(DATA_STRUCTURES_KEY),
dsInfo, create);
+
+        if (err != null)
+            throw err;
+
+        try (IgniteInternalTx tx = utilityCache.txStartEx(PESSIMISTIC, REPEATABLE_READ))
{
+            dsMap = utilityCache.get(DATA_STRUCTURES_KEY);
+
+            validateDataStructure(dsMap, dsInfo, create);
+
+            String cacheName;
+
+            if (create) {
+                if (dsMap == null)  {
+                    dsMap = new HashMap<>();
+
+                    dsMap.put(name, dsInfo);
+                }
+
+                DataStructureInfo info = dsMap.get(name);
+
+                if (info == null)
+                    dsMap.put(name, info);
+            }
+            else if (dsMap == null || !dsMap.containsKey(name))
+                return null;
+
+            tx.commit();
         }
 
         GridCacheAdapter cache = cacheForCollection(cfg);
@@ -604,6 +655,27 @@ public final class CacheDataStructuresProcessor extends GridProcessorAdapter
{
     }
 
     /**
+     * @param dsMap Map with data structure information.
+     * @param info New data structure information.
+     * @return {@link IgniteException} if validation failed.
+     */
+    @Nullable private static IgniteCheckedException validateDataStructure(
+        @Nullable Map<String, DataStructureInfo> dsMap,
+        DataStructureInfo info,
+        boolean create)
+    {
+        if (dsMap == null)
+            return null;
+
+        DataStructureInfo oldInfo = dsMap.get(info.name);
+
+        if (oldInfo != null)
+            return oldInfo.validateConfiguration(info, create);
+
+        return null;
+    }
+
+    /**
      * Gets or creates count down latch. If count down latch is not found in cache,
      * it is created using provided name and count parameter.
      *
@@ -625,7 +697,8 @@ public final class CacheDataStructuresProcessor extends GridProcessorAdapter
{
     {
         A.notNull(name, "name");
 
-        A.ensure(cnt >= 0, "count can not be negative");
+        if (create)
+            A.ensure(cnt >= 0, "count can not be negative");
 
         checkAtomicsConfiguration();
 
@@ -955,4 +1028,304 @@ public final class CacheDataStructuresProcessor extends GridProcessorAdapter
{
             throw new IgniteException("Atomic data structure can not be created, " +
                 "need to provide IgniteAtomicConfiguration.");
     }
+
+    /**
+     *
+     */
+    static enum DataStructureType {
+        /** */
+        ATOMIC_LONG(IgniteAtomicLong.class.getSimpleName()),
+
+        /** */
+        ATOMIC_REF(IgniteAtomicReference.class.getSimpleName()),
+
+        /** */
+        ATOMIC_SEQ(IgniteAtomicSequence.class.getSimpleName()),
+
+        /** */
+        ATOMIC_STAMPED(IgniteAtomicStamped.class.getSimpleName()),
+
+        /** */
+        QUEUE(IgniteQueue.class.getSimpleName()),
+
+        /** */
+        SET(IgniteSet.class.getSimpleName());
+
+        /** */
+        private static final DataStructureType[] VALS = values();
+
+        /** */
+        private String name;
+
+        /**
+         * @param name Name.
+         */
+        DataStructureType(String name) {
+            this.name = name;
+        }
+
+        /**
+         * @return Data structure public class name.
+         */
+        public String className() {
+            return name;
+        }
+
+        /**
+         * @param ord Ordinal value.
+         * @return Enumerated value or {@code null} if ordinal out of range.
+         */
+        @Nullable public static DataStructureType fromOrdinal(int ord) {
+            return ord >= 0 && ord < VALS.length ? VALS[ord] : null;
+        }
+    }
+
+    /**
+     *
+     */
+    static class SetInfo implements Externalizable {
+        /** */
+        private boolean collocated;
+
+        /** */
+        private String cacheName;
+
+        /**
+         * Required by {@link Externalizable}.
+         */
+        public SetInfo() {
+            // No-op.
+        }
+
+        /**
+         * @param collocated Collocated flag.
+         */
+        public SetInfo(boolean collocated) {
+            this.collocated = collocated;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
+            collocated = in.readBoolean();
+        }
+
+        /** {@inheritDoc} */
+        @Override public void writeExternal(ObjectOutput out) throws IOException {
+            out.writeBoolean(collocated);
+        }
+    }
+
+    /**
+     *
+     */
+    static class QueueInfo implements Externalizable {
+        /** */
+        private boolean collocated;
+
+        /** */
+        private int cap;
+
+        /** */
+        private String cacheName;
+
+        /**
+         * Required by {@link Externalizable}.
+         */
+        public QueueInfo() {
+            // No-op.
+        }
+
+        /**
+         * @param collocated Collocated flag.
+         * @param cap Queue capacity.
+         * @param cacheName Cache name.
+         */
+        public QueueInfo(boolean collocated, int cap, String cacheName) {
+            this.collocated = collocated;
+            this.cap = cap;
+            this.cacheName = cacheName;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
+            collocated = in.readBoolean();
+            cap = in.readInt();
+            cacheName = U.readString(in);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void writeExternal(ObjectOutput out) throws IOException {
+            out.writeBoolean(collocated);
+            out.writeInt(cap);
+            U.writeString(out, cacheName);
+        }
+    }
+
+    /**
+     *
+     */
+    static class DataStructureInfo implements Externalizable {
+        /** */
+        private static final long serialVersionUID = 0L;
+
+        /** */
+        private String name;
+
+        /** */
+        private DataStructureType type;
+
+        /** */
+        private Object info;
+
+        /**
+         * Required by {@link Externalizable}.
+         */
+        public DataStructureInfo() {
+            // No-op.
+        }
+
+        /**
+         * @param name Data structure name.
+         * @param type Data structure type.
+         * @param info Data structure information.
+         */
+        DataStructureInfo(String name, DataStructureType type, Externalizable info) {
+            this.name = name;
+            this.type = type;
+            this.info = info;
+        }
+
+        /**
+         * @param dsInfo New data structure info.
+         * @param create Create flag.
+         * @return Exception if validation failed.
+         */
+        @Nullable IgniteCheckedException validateConfiguration(DataStructureInfo dsInfo,
boolean create) {
+            if (type != dsInfo.type) {
+                return new IgniteCheckedException("Another data structure with the same name
already created " +
+                    "[name= " + name +
+                    ", new= " + dsInfo.type.className() +
+                    ", existing=" + type.className() + ']');
+            }
+
+            if (create) {
+                if (type == DataStructureType.QUEUE ) {
+                    QueueInfo oldInfo = (QueueInfo)info;
+                    QueueInfo newInfo = (QueueInfo)dsInfo.info;
+
+                    if (oldInfo.collocated != newInfo.collocated) {
+                        return new IgniteCheckedException("Another queue with the same name
but different " +
+                            "configuration already created [name= " + name +
+                            ", newCollocated= " + newInfo.collocated +
+                            ", existingCollocated=" + newInfo.collocated + ']');
+                    }
+
+                    if (oldInfo.cap != newInfo.cap) {
+                        return new IgniteCheckedException("Another queue with the same name
but different " +
+                            "configuration already created [name= " + name +
+                            ", newCapacity= " + newInfo.cap+
+                            ", existingCapacity=" + newInfo.cap + ']');
+                    }
+                }
+                else if (type == DataStructureType.SET ) {
+                    SetInfo oldInfo = (SetInfo)info;
+                    SetInfo newInfo = (SetInfo)dsInfo.info;
+
+                    if (oldInfo.collocated != newInfo.collocated) {
+                        return new IgniteCheckedException("Another set with the same name
but different " +
+                            "configuration already created [name= " + name +
+                            ", newCollocated= " + newInfo.collocated +
+                            ", existingCollocated=" + newInfo.collocated + ']');
+                    }
+                }
+            }
+
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void writeExternal(ObjectOutput out) throws IOException {
+            U.writeString(out, name);
+            U.writeEnum(out, type);
+            out.writeObject(info);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
+            name = U.readString(in);
+            type = DataStructureType.fromOrdinal(in.readByte());
+            info = in.readObject();
+        }
+    }
+    /**
+     *
+     */
+    static class AddAtomicProcessor implements
+        EntryProcessor<CacheDataStructuresConfigurationKey, Map<String, DataStructureInfo>,
IgniteException>,
+        Externalizable {
+        /** */
+        private static final long serialVersionUID = 0L;
+
+        /** */
+        private DataStructureInfo info;
+
+        /**
+         * @param info Data structure information.
+         */
+        AddAtomicProcessor(DataStructureInfo info) {
+            this.info = info;
+        }
+
+        /**
+         * Required by {@link Externalizable}.
+         */
+        public AddAtomicProcessor() {
+            // No-op.
+        }
+
+        /** {@inheritDoc} */
+        @Override public IgniteException process(
+            MutableEntry<CacheDataStructuresConfigurationKey, Map<String, DataStructureInfo>>
entry,
+            Object... args)
+            throws EntryProcessorException
+        {
+            Map<String, DataStructureInfo> map = entry.getValue();
+
+            if (map == null) {
+                map = new HashMap<>();
+
+                map.put(info.name, info);
+
+                entry.setValue(map);
+
+                return null;
+            }
+
+            DataStructureInfo oldInfo = map.get(info.name);
+
+            if (oldInfo == null) {
+                map = new HashMap<>(map);
+
+                map.put(info.name, info);
+
+                entry.setValue(map);
+
+                return null;
+            }
+
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void writeExternal(ObjectOutput out) throws IOException {
+            info.writeExternal(out);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
+            info = new DataStructureInfo();
+
+            info.readExternal(in);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/368dd637/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestIgnite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestIgnite.java
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestIgnite.java
index 053c057..aae6e61 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestIgnite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestIgnite.java
@@ -261,7 +261,6 @@ public class GridTestIgnite implements Ignite {
         IgniteCollectionConfiguration cfg,
         int cap,
         boolean create)
-        throws IgniteCheckedException
     {
         return null;
     }
@@ -270,7 +269,6 @@ public class GridTestIgnite implements Ignite {
     @Nullable @Override public <T> IgniteSet<T> set(String name,
         IgniteCollectionConfiguration cfg,
         boolean create)
-        throws IgniteCheckedException
     {
         return null;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/368dd637/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java b/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
index fe3d1d0..4e20379 100644
--- a/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
+++ b/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
@@ -320,16 +320,14 @@ public class IgniteSpringBean implements Ignite, DisposableBean, InitializingBea
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public IgniteAtomicSequence atomicSequence(String name, long initVal,
boolean create)
-        throws IgniteCheckedException {
+    @Nullable @Override public IgniteAtomicSequence atomicSequence(String name, long initVal,
boolean create) {
         assert g != null;
 
         return g.atomicSequence(name, initVal, create);
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public IgniteAtomicLong atomicLong(String name, long initVal, boolean
create)
-        throws IgniteCheckedException {
+    @Nullable @Override public IgniteAtomicLong atomicLong(String name, long initVal, boolean
create) {
         assert g != null;
 
         return g.atomicLong(name, initVal, create);
@@ -339,7 +337,6 @@ public class IgniteSpringBean implements Ignite, DisposableBean, InitializingBea
     @Nullable @Override public <T> IgniteAtomicReference<T> atomicReference(String
name,
         @Nullable T initVal,
         boolean create)
-        throws IgniteCheckedException
     {
         assert g != null;
 
@@ -351,7 +348,6 @@ public class IgniteSpringBean implements Ignite, DisposableBean, InitializingBea
         @Nullable T initVal,
         @Nullable S initStamp,
         boolean create)
-        throws IgniteCheckedException
     {
         assert g != null;
 
@@ -363,7 +359,6 @@ public class IgniteSpringBean implements Ignite, DisposableBean, InitializingBea
         int cnt,
         boolean autoDel,
         boolean create)
-        throws IgniteCheckedException
     {
         assert g != null;
 
@@ -375,7 +370,6 @@ public class IgniteSpringBean implements Ignite, DisposableBean, InitializingBea
         IgniteCollectionConfiguration cfg,
         int cap,
         boolean create)
-        throws IgniteCheckedException
     {
         assert g != null;
 
@@ -386,7 +380,7 @@ public class IgniteSpringBean implements Ignite, DisposableBean, InitializingBea
     @Nullable @Override public <T> IgniteSet<T> set(String name,
         IgniteCollectionConfiguration cfg,
         boolean create)
-        throws IgniteCheckedException {
+    {
         assert g != null;
 
         return g.set(name, cfg, create);


Mime
View raw message