public interface ShardingKeyBuilder
XADataSourceobject, used to create a
ShardingKeywith sub-keys of supported data types. Implementations must support JDBCType.VARCHAR and may also support additional data types.
The following example illustrates the use of
DataSource ds = new MyDataSource(); ShardingKey shardingKey = ds.createShardingKeyBuilder() .subkey("abc", JDBCType.VARCHAR) .subkey(94002, JDBCType.INTEGER) .build();
|Modifier and Type||Method||Description|
Returns an instance of the object defined by this builder.
This method will be called to add a subkey into a Sharding Key object being built.
ShardingKeyBuilder subkey(Object subkey, SQLType subkeyType)
subkey- contains the object that needs to be part of shard sub key
subkeyType- sub-key data type of type java.sql.SQLType
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.