ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject incubator-ignite git commit: # IGNITE-45 Implemented IgniteKernal#destroyCache()
Date Mon, 16 Mar 2015 13:28:41 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-45 898c19b0b -> 1d721826a


# IGNITE-45 Implemented IgniteKernal#destroyCache()


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

Branch: refs/heads/ignite-45
Commit: 1d721826a1a62bc27433170fb67ac7cbe1d9261d
Parents: 898c19b
Author: sevdokimov <sevdokimov@gridgain.com>
Authored: Mon Mar 16 16:28:04 2015 +0300
Committer: sevdokimov <sevdokimov@gridgain.com>
Committed: Mon Mar 16 16:28:04 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/IgniteKernal.java   | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1d721826/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 6e7ca2b..43a2386 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
@@ -2263,7 +2263,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
             return ctx.cache().publicJCache(cacheCfg.getName());
         }
         catch (IgniteCheckedException e) {
-            throw new CacheException(e);
+            throw CU.convertToCacheException(e);
         }
         finally {
             unguard();
@@ -2281,7 +2281,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
             return ctx.cache().publicJCache(cacheCfg.getName());
         }
         catch (IgniteCheckedException e) {
-            throw new CacheException(e);
+            throw CU.convertToCacheException(e);
         }
         finally {
             unguard();
@@ -2299,7 +2299,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
             return ctx.cache().publicJCache(nearCfg.getName());
         }
         catch (IgniteCheckedException e) {
-            throw new CacheException(e);
+            throw CU.convertToCacheException(e);
         }
         finally {
             unguard();
@@ -2308,8 +2308,17 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
 
     /** {@inheritDoc} */
     @Override public void destroyCache(String cacheName) {
-        // TODO: implement.
+        guard();
 
+        try {
+            ctx.cache().dynamicStopCache(cacheName).get();
+        }
+        catch (IgniteCheckedException e) {
+            throw CU.convertToCacheException(e);
+        }
+        finally {
+            unguard();
+        }
     }
 
     /**


Mime
View raw message