Class OracleShardingKeyBuilderImpl

    • Constructor Detail

      • OracleShardingKeyBuilderImpl

        public OracleShardingKeyBuilderImpl()
    • Method Detail

      • subkey

        public OracleShardingKeyBuilderImpl subkey​(java.lang.Object subkey,
                                                   java.sql.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 java.sql.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:
        OracleShardingKeyBuilder.subkey(java.lang.Object, java.sql.SQLType)
      • 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 java.sql.ShardingKeyBuilder
        Returns:
        returns the new sharding key object that is built
        See Also:
        OracleShardingKeyBuilder.build()