code: 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;
      }
docs: Updates the value of the sharding keys after validating them.
  
  @param shardingKey the new sharding key.
  @param superShardingKey the new super sharding key. The 'unchanged' constant can be used to avoid changing it.
  @param timeout number of seconds within which validation must be done. 0 indicates no timeout.
  @return true if the sharding keys are valid and were successfully set on the connection. Otherwise, false.