ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [11/50] [abbrv] incubator-ignite git commit: # IGNITE-32: Fixes on review.
Date Thu, 05 Feb 2015 06:36:16 GMT
# IGNITE-32: Fixes on review.


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

Branch: refs/heads/sprint-1
Commit: 27c09c204513c20bd3c3a5be2194d7dec57f1df8
Parents: 605088c
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Mon Feb 2 20:59:35 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Mon Feb 2 20:59:35 2015 +0700

----------------------------------------------------------------------
 .../ignite/cache/store/jdbc/JdbcCacheStore.java       | 14 +++-----------
 .../ignite/cache/store/jdbc/JdbcPojoCacheStore.java   |  6 ++++--
 2 files changed, 7 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/27c09c20/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
index 9ad64ab..71acce1 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
@@ -170,6 +170,8 @@ public abstract class JdbcCacheStore<K, V> extends CacheStore<K,
V> implements G
     protected JdbcDialect resolveDialect() throws CacheException {
         Connection conn = null;
 
+        // TODO check conn.getMetaData().getURL() will work ???
+
         String dbProductName = null;
 
         try {
@@ -204,16 +206,6 @@ public abstract class JdbcCacheStore<K, V> extends CacheStore<K,
V> implements G
         return new BasicJdbcDialect();
     }
 
-    /**
-     *
-     * @return Cache key id.
-     */
-    protected Integer cacheKeyId() {
-        String cacheName = session().cacheName();
-
-        return cacheName != null ? cacheName.hashCode() : 0;
-    }
-
     /** {@inheritDoc} */
     @Override public void configure(Object... params) {
         // No-op.
@@ -395,7 +387,7 @@ public abstract class JdbcCacheStore<K, V> extends CacheStore<K,
V> implements G
      * @param clo Closure for loaded values.
      * @return Callable for pool submit.
      */
-    private Callable<Void> loadCacheFull(final EntryMapping m, final IgniteBiInClosure<K,
V> clo) {
+    private Callable<Void> loadCacheFull(EntryMapping m, IgniteBiInClosure<K, V>
clo) {
         return loadCacheRange(m, clo, null, null);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/27c09c20/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcPojoCacheStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcPojoCacheStore.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcPojoCacheStore.java
index 834d49f..fef7001 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcPojoCacheStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcPojoCacheStore.java
@@ -146,9 +146,11 @@ public class JdbcPojoCacheStore extends JdbcCacheStore<Object, Object>
{
             typeMethods.put(type.getType(), new PojoMethodsCache(type.getType(), tblMeta.getValueColumns()));
         }
 
-        mtdsCache = new HashMap<>(mtdsCache);
+        HashMap<String, Map<String, PojoMethodsCache>> newMtdsCache = new HashMap<>(mtdsCache);
 
-        mtdsCache.put(cacheName, typeMethods);
+        newMtdsCache.put(cacheName, typeMethods);
+
+        mtdsCache = newMtdsCache;
     }
 
     /** {@inheritDoc} */


Mime
View raw message