Package oracle.jdbc.pool
Class OracleShardingKeyBuilderImpl
java.lang.Object
oracle.jdbc.pool.OracleShardingKeyBuilderImpl
- All Implemented Interfaces:
ShardingKeyBuilder,OracleShardingKeyBuilder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT_ORA_HASH
public static final long DEFAULT_ORA_HASH- See Also:
-
-
Constructor Details
-
OracleShardingKeyBuilderImpl
public OracleShardingKeyBuilderImpl()
-
-
Method Details
-
subkey
This method is called to include a subkey into a sharding key object being built. The order in which subkey method is called is important as it indicates the order of placement of the subkey within the sharding key.- Specified by:
subkeyin interfaceOracleShardingKeyBuilder- Specified by:
subkeyin interfaceShardingKeyBuilder- Parameters:
subkey- contains the object that needs to be part of sharding sub keysubkeyType- sub-key data type which can be specified using one of the types from java.sql.JDBCType or oracle.jdbc.OracleType- Returns:
- this builder object
- See Also:
-
oraHash
Used to build the shard key with the known ORA HASH value. This is used to optimize sharding key comparisons for hash based sharding.- Parameters:
oraHash- the known ORA HASH value for the shard key that is being built.- Returns:
- this builder object
-
build
Builds the sharding key with the sub keys provided and their default metadata. The sharding key object built is immutable. The build() method can be called only once on a builder object, subsequent attempts to call build() will result in IllegalStateException.- Specified by:
buildin interfaceOracleShardingKeyBuilder- Specified by:
buildin interfaceShardingKeyBuilder- Returns:
- returns the new sharding key object that is built
- See Also:
-