public interface OracleShardingKeyBuilder
OracleDataSource or
OracleXADataSource or OracleConnectionPoolDataSource object,
used to create a OracleShardingKey with sub-keys of supported data
types.
The following example illustrates the use of OracleShardingKeyBuilder
to create a OracleShardingKey:
OracleDataSource ods = new oracle.jdbc.pool.OracleDataSource();
OracleShardingKey shardingKey =
ods.createShardingKeyBuilder()
.subkey("Customer_Name_XYZ", JDBCType.VARCHAR)
.subkey(94002, JDBCType.NUMERIC)
.build();
| Modifier and Type | Method and Description |
|---|---|
OracleShardingKey |
build()
Builds the Sharding key.
|
OracleShardingKeyBuilder |
subkey(java.lang.Object key,
java.sql.SQLType subkeyType)
This method is called to include a subkey into a sharding Key object being
built.
|
OracleShardingKeyBuilder subkey(java.lang.Object key, java.sql.SQLType subkeyType)
key - contains the sharding sub-key object.subkeyType - sharding sub-key data type.OracleShardingKeyBuilder objectOracleShardingKey build() throws java.sql.SQLException
OracleShardingKey object that is built.java.sql.SQLException - if there is an error while building the Sharding key.