ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject incubator-ignite git commit: # IGNITE-45 javadocs.
Date Mon, 23 Mar 2015 06:31:18 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-45-330 fee55c559 -> 2f468cba1


# IGNITE-45 javadocs.


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

Branch: refs/heads/ignite-45-330
Commit: 2f468cba1a30d7bd0f9b4ea823d0b24987992e5e
Parents: fee55c5
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Mon Mar 23 13:31:23 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Mon Mar 23 13:31:23 2015 +0700

----------------------------------------------------------------------
 .../store/jdbc/CacheAbstractJdbcStore.java      | 48 +++++++++++---------
 .../store/jdbc/dialect/BasicJdbcDialect.java    |  2 +-
 .../cache/store/jdbc/dialect/DB2Dialect.java    |  2 +-
 .../store/jdbc/dialect/SQLServerDialect.java    |  2 +-
 4 files changed, 30 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2f468cba/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
index b0031ab..7ae6d85 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
@@ -43,39 +43,45 @@ import java.util.concurrent.locks.*;
 import static java.sql.Statement.*;
 
 /**
- * Base {@link CacheStore} implementation backed by JDBC. This implementation stores objects
in underlying database
- * using mapping description.
+ * Implementation of {@link CacheStore} backed by JDBC.
+ * <p>
+ * Store works with database via SQL dialect. Ignite ships with dialects for most popular
databases:
+ * <ul>
+ *     <li>{@link DB2Dialect} - dialect for IBM DB2 database.</li>
+ *     <li>{@link OracleDialect} - dialect for Oracle database.</li>
+ *     <li>{@link SQLServerDialect} - dialect for Microsoft SQL Server database.</li>
+ *     <li>{@link MySQLDialect} - dialect for Oracle MySQL database.</li>
+ *     <li>{@link H2Dialect} - dialect for H2 database.</li>
+ *     <li>{@link BasicJdbcDialect} - dialect for any database via plain JDBC.</li>
+ * </ul>
  * <p>
  * <h2 class="header">Configuration</h2>
- * Sections below describe mandatory and optional configuration settings as well
- * as providing example using Java and Spring XML.
- * <h3>Mandatory</h3>
- * There are no mandatory configuration parameters.
- * <h3>Optional</h3>
  * <ul>
  *     <li>Data source (see {@link #setDataSource(DataSource)}</li>
+ *     <li>Dialect (see {@link #setDialect(JdbcDialect)}</li>
  *     <li>Maximum batch size for writeAll and deleteAll operations. (see {@link #setBatchSize(int)})</li>
  *     <li>Max workers thread count. These threads are responsible for load cache.
(see {@link #setMaxPoolSize(int)})</li>
  *     <li>Parallel load cache minimum threshold. (see {@link #setParallelLoadCacheMinimumThreshold(int)})</li>
  * </ul>
  * <h2 class="header">Java Example</h2>
  * <pre name="code" class="java">
- *     ...
- *     JdbcPojoCacheStore store = new JdbcPojoCacheStore();
- *     ...
+ * ...
+ * CacheConfiguration ccfg = new CacheConfiguration<>();
  *
+ * // Configure cache store.
+ * ccfg.setCacheStoreFactory(new FactoryBuilder.SingletonFactory(ConfigurationSnippet.store()));
+ * ccfg.setReadThrough(true);
+ * ccfg.setWriteThrough(true);
+ *
+ * // Enable database batching.
+ * ccfg.setWriteBehindEnabled(true);
+ *
+ * // Configure cache types metadata.
+ * ccfg.setTypeMetadata(ConfigurationSnippet.typeMetadata());
+ *
+ * cfg.setCacheConfiguration(ccfg);
+ * ...
  * </pre>
- * <h2 class="header">Spring Example</h2>
- * <pre name="code" class="xml">
- *     ...
- *     &lt;bean id=&quot;cache.jdbc.store&quot;
- *         class=&quot;org.apache.ignite.cache.store.jdbc.JdbcPojoCacheStore&quot;&gt;
- *         &lt;property name=&quot;connectionUrl&quot; value=&quot;jdbc:h2:mem:&quot;/&gt;
- *     &lt;/bean&gt;
- *     ...
- * </pre>
- * <p>
- * For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a>
  */
 public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
LifecycleAware {
     /** Max attempt write count. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2f468cba/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/BasicJdbcDialect.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/BasicJdbcDialect.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/BasicJdbcDialect.java
index ffca656..d0dd6f4 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/BasicJdbcDialect.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/BasicJdbcDialect.java
@@ -23,7 +23,7 @@ import org.apache.ignite.internal.util.typedef.internal.*;
 import java.util.*;
 
 /**
- * Represents a dialect of SQL implemented by a particular RDBMS.
+ * Basic implementation of dialect based on JDBC specification.
  */
 public class BasicJdbcDialect implements JdbcDialect {
     /** Default max query parameters count. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2f468cba/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/DB2Dialect.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/DB2Dialect.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/DB2Dialect.java
index bc55d97..fe1d876 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/DB2Dialect.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/DB2Dialect.java
@@ -22,7 +22,7 @@ import org.apache.ignite.internal.util.typedef.*;
 import java.util.*;
 
 /**
- * A dialect compatible with the DB2 database.
+ * A dialect compatible with the IBM DB2 database.
  */
 public class DB2Dialect extends BasicJdbcDialect {
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2f468cba/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/SQLServerDialect.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/SQLServerDialect.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/SQLServerDialect.java
index 2de61b2..e781e98 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/SQLServerDialect.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/SQLServerDialect.java
@@ -22,7 +22,7 @@ import org.apache.ignite.internal.util.typedef.*;
 import java.util.*;
 
 /**
- * A dialect compatible with the MsSQL database.
+ * A dialect compatible with the Microsoft SQL Server database.
  */
 public class SQLServerDialect extends BasicJdbcDialect {
     /** {@inheritDoc} */


Mime
View raw message