ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [23/39] incubator-ignite git commit: Merge branch 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sql-tests
Date Mon, 16 Mar 2015 05:33:27 GMT
Merge branch 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sql-tests


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

Branch: refs/heads/ignite-45
Commit: 39ae21b30eee7bc78ec6d92ce6cb0b3ed98a43f2
Parents: 43f13f9 52ee235
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Sun Mar 15 20:33:10 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Sun Mar 15 20:33:10 2015 +0300

----------------------------------------------------------------------
 bin/ignite-schema-import.bat                    |   2 +-
 bin/ignite-schema-import.sh                     |   4 +-
 examples/config/store/example-database.script   |  22 +--
 .../config/store/example-jdbc-pojo-store.xml    | 142 -------------------
 .../store/CacheNodeWithStoreStartup.java        |  45 ++++--
 .../datagrid/store/CacheStoreExample.java       |  19 +++
 .../store/jdbc/CacheJdbcPojoPersonStore.java    |  11 --
 .../examples/datagrid/store/model/Person.java   |   2 +-
 .../datagrid/store/model/PersonKey.java         |  97 -------------
 .../core/src/test/config/store/jdbc/Ignite.xml  |   2 +-
 .../cache/store/jdbc/model/Organization.java    |   2 +-
 .../cache/store/jdbc/model/OrganizationKey.java |   2 +-
 .../ignite/cache/store/jdbc/model/Person.java   |   2 +-
 .../store/jdbc/model/PersonComplexKey.java      |   2 +-
 .../cache/store/jdbc/model/PersonKey.java       |   2 +-
 15 files changed, 76 insertions(+), 280 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/39ae21b3/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheNodeWithStoreStartup.java
----------------------------------------------------------------------
diff --cc examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheNodeWithStoreStartup.java
index 3f780a4,6304193..a35fa41
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheNodeWithStoreStartup.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheNodeWithStoreStartup.java
@@@ -73,16 -90,29 +90,26 @@@ public class CacheNodeWithStoreStartup 
          // Set atomicity as transaction, since we are showing transactions in example.
          cacheCfg.setAtomicityMode(TRANSACTIONAL);
  
 -        // Set query indexing enabled for use query in example.
 -        cacheCfg.setQueryIndexEnabled(true);
 -
          CacheStore<Long, Person> store;
  
-         // Uncomment other cache stores to try them.
-         store = new CacheDummyPersonStore();
-         // store = new CacheJdbcPersonStore();
-         // store = new CacheHibernatePersonStore();
+         switch (STORE) {
+             case DUMMY:
+                 store = new CacheDummyPersonStore();
+                 break;
+ 
+             case SIMPLE_JDBC:
+                 store = new CacheJdbcPersonStore();
+                 break;
+ 
+             case HIBERNATE:
+                 store = new CacheHibernatePersonStore();
+                 break;
  
-         // Uncomment two lines for try CacheJdbcPojoStore.
-         // store = new CacheJdbcPojoPersonStore();
-         // cacheCfg.setTypeMetadata(typeMetadata());
+             default:
+                 store = new CacheJdbcPojoPersonStore();
+                 cacheCfg.setTypeMetadata(typeMetadata());
+                 break;
+         }
  
          cacheCfg.setCacheStoreFactory(new FactoryBuilder.SingletonFactory<>(store));
          cacheCfg.setReadThrough(true);


Mime
View raw message