public final boolean setShardingKeysIfValid ( Object shardingKey , Object superShardingKey , int timeout ) throws SQLException { if ( mcf . beforeJDBCVersion ( JDBCRuntimeVersion . VERSION_4_3 ) ) throw new SQLFeatureNotSupportedException ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "Set sharding key/super sharding key to " + shardingKey + "/" + superShardingKey + " within " + timeout + " seconds" ) ; boolean updated = mcf . jdbcRuntime . doSetShardingKeysIfValid ( sqlConn , shardingKey , superShardingKey , timeout ) ; if ( updated ) { currentShardingKey = shardingKey ; if ( superShardingKey != JDBCRuntimeVersion . SUPER_SHARDING_KEY_UNCHANGED ) currentSuperShardingKey = superShardingKey ; connectionPropertyChanged = true ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "successful? " + updated ) ; return updated ; }
Updates the value of the sharding keys after validating them .