Class OracleShardingKeyBuilderImpl

java.lang.Object
oracle.jdbc.pool.OracleShardingKeyBuilderImpl
All Implemented Interfaces:
ShardingKeyBuilder, OracleShardingKeyBuilder

public class OracleShardingKeyBuilderImpl extends Object implements OracleShardingKeyBuilder
  • Field Details

  • Constructor Details

    • OracleShardingKeyBuilderImpl

      public OracleShardingKeyBuilderImpl()
  • Method Details

    • subkey

      public OracleShardingKeyBuilderImpl subkey(Object subkey, SQLType subkeyType)
      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:
      subkey in interface OracleShardingKeyBuilder
      Specified by:
      subkey in interface ShardingKeyBuilder
      Parameters:
      subkey - contains the object that needs to be part of sharding sub key
      subkeyType - 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

      public OracleShardingKeyBuilderImpl oraHash(long 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

      public OracleShardingKeyImpl 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:
      build in interface OracleShardingKeyBuilder
      Specified by:
      build in interface ShardingKeyBuilder
      Returns:
      returns the new sharding key object that is built
      See Also: