| <?xml version="1.0" encoding="utf-8" standalone="yes"?> |
| <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> |
| <channel> |
| <title>Java API on ShardingSphere</title> |
| <link>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/java-api/</link> |
| <description>Recent content in Java API on ShardingSphere</description> |
| <generator>Hugo -- gohugo.io</generator> |
| <language>en-us</language> |
| |
| <atom:link href="https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/java-api/index.xml" rel="self" type="application/rss+xml" /> |
| |
| |
| <item> |
| <title>Mode</title> |
| <link>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/java-api/mode/</link> |
| <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate> |
| |
| <guid>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/java-api/mode/</guid> |
| <description>Background Build the running mode through Java API. |
| Parameters Class name: org.apache.shardingsphere.infra.config.mode.ModeConfiguration |
| Attributes: |
| Name DataType Description Default Value type String Type of mode configuration |
| Values could be: Standalone or Cluster Standalone repository PersistRepositoryConfiguration Persist repository configuration |
| Standalone type uses StandalonePersistRepositoryConfiguration |
| Cluster type uses ClusterPersistRepositoryConfiguration overwrite boolean Whether overwrite persistent configuration with local configuration false Standalone Persist Configuration Class name: org.</description> |
| </item> |
| |
| <item> |
| <title>Data Source</title> |
| <link>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/java-api/data-source/</link> |
| <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate> |
| |
| <guid>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/java-api/data-source/</guid> |
| <description>Background ShardingSphere-JDBC supports all database JDBC drivers and connection pools. |
| This section describes how to configure data sources through the JAVA API. |
| Procedure 1. Import Maven dependency. &lt;dependency&gt; &lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt; &lt;artifactId&gt;shardingsphere-jdbc-core&lt;/artifactId&gt; &lt;version&gt;${latest.release.version}&lt;/version&gt; &lt;/dependency&gt; Notice: Please change ${latest.release.version} to the actual version. |
| Sample ModeConfiguration modeConfig = // Build running mode Map&lt;String, DataSource&gt; dataSourceMap = createDataSources(); Collection&lt;RuleConfiguration&gt; ruleConfigs = ... // Build specific rules Properties props = ... // Build attribute configuration DataSource dataSource = ShardingSphereDataSourceFactory.</description> |
| </item> |
| |
| <item> |
| <title>Algorithm</title> |
| <link>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/java-api/algorithm/</link> |
| <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate> |
| |
| <guid>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/java-api/algorithm/</guid> |
| <description>Sharding ShardingRuleConfiguration ruleConfiguration = new ShardingRuleConfiguration(); // algorithmName is specified by users and should be consistent with the sharding algorithm in the sharding strategy. // type and props, please refer to the built-in sharding algorithm: https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/builtin-algorithm/sharding/ ruleConfiguration.getShardingAlgorithms().put(&#34;algorithmName&#34;, new AlgorithmConfiguration(&#34;xxx&#34;, new Properties())); Encryption // encryptorName is specified by users, and its property should be consistent with that of encryptorName in encryption rules. // type and props, please refer to the built-in encryption algorithm: https://shardingsphere.</description> |
| </item> |
| |
| </channel> |
| </rss> |