Sets the metric query key and index, setting the Parameter type to
METRIC_QUERY
@param metric_query The metric query id
@param sub_query_index The index of the metric query
@param param_index The index of the parameter (??)
343479
public void addSubMetricQuery(final String metric_query, 
                                final int sub_query_index,
                                final int param_index) {
    if (metric_query == null || metric_query.isEmpty()) {
      throw new IllegalArgumentException("Metric query cannot be null or empty");
    }
    if (sub_query_index < 0) {
      throw new IllegalArgumentException("Sub query index must be 0 or greater");
    }
    if (param_index < 0) {
      throw new IllegalArgumentException("Parameter index must be 0 or greater");
    }
    if (sub_metric_queries == null) {
      sub_metric_queries = Maps.newHashMap();
    }
    sub_metric_queries.put(sub_query_index, metric_query);
    parameter_index.put(param_index, Parameter.METRIC_QUERY);
  }
1093074
def setParameter(self, parameterName, index, parameterValue):
    
    if parameterName in self._poolerArgNames:
      setattr(self._pooler, parameterName, parameterValue)
    elif hasattr(self, parameterName):
      setattr(self, parameterName, parameterValue)
    else:
      raise Exception("Unknown parameter: " + parameterName)
22487
protected String getParameter(final List<String> params, final int index) {

		if (params.size() > index) {

			return params.get(index);
		}

		return null;
	}
397191
public void setGridTable(String keyAreaName, Rec gridTable, int index)
    {
        if (index == -1)
            index = m_iNextArrayIndex;  // Next available
        m_iNextArrayIndex = Math.max(m_iNextArrayIndex, index+1);
        if (gridTable == null) if (m_gridScreen != null)
            gridTable = m_gridScreen.getMainRecord();
        if (gridTable != null) if (m_gridScreen != null) if (gridTable != m_gridScreen.getMainRecord())
        {
            if (m_gridScreen.getMainRecord() instanceof QueryRecord)
            {
                int keyIndex = ((QueryRecord)m_gridScreen.getMainRecord()).setGridFile((Record)gridTable, keyAreaName);    // Sets the key order and gridtable (even if only one file)
                keyAreaName = gridTable.getKeyArea(keyIndex).getKeyName();
            }
        }
        m_iKeyAreaArray[index] = keyAreaName;
    }
600532
def set_index(self, index):
        
        item = index.internalPointer()
        self.actionunit = item.internal_data()
        self.setEnabled(bool(self.actionunit.status.traceback))
161155
@Override
   public void setParameter(double value,int index){
        Compound component = substance.getVapor().getComponent();
        Alpha alpha = substance.getVapor().getAlpha();
        alpha.setParameter(value, component, index);
   }
386666
protected void parameterLog(final int index) {
		if (LOG.isDebugEnabled() && Boolean.FALSE.toString().equals(MDC.get("SuppressParameterLogOutput"))) {
			LOG.debug("Set the parameter.[INDEX[{}], {}]", index, this);
		}
	}
1136152
public int setParameter(final PreparedStatement preparedStatement, final int index,
			final BindParameterMapperManager parameterMapperManager) throws SQLException {
		return setInParameter(preparedStatement, index, parameterMapperManager);
	}
704586
public QueryParameters update(int index, QueryParameters params) throws SQLException {
        AssertUtils.assertNotNull(params, "Element cannot be null, but values inside of it - can");

        if (this.type == Type.READ_ONLY_FORWARD || this.type == Type.READ_ONLY_SCROLL) {
            throw new MjdbcSQLException("This Lazy query output cache is initialized as read-only - therefore cannot be updated.");
        }

        QueryParameters result = get(index);

        if (this.type == Type.UPDATE_FORWARD) {
            if (this.currentIndex == index) {
                updateResultSetCurrentLine(getCurrentResultSet(), params);
            } else if (this.currentIndex + 1 == index) {
                updateResultSetRow((index + 1) - generatedCacheMap.size(), params);
            } else {
                throw new MjdbcRuntimeException("Only current/next element can be updated!");
            }

            getCurrentResultSet().updateRow();

            this.currentIndex = index;
        } else if (this.type == Type.UPDATE_SCROLL) {

            updateResultSetRow((index + 1) - generatedCacheMap.size(), params);
            getCurrentResultSet().updateRow();
        } else {
            throw new MjdbcSQLException("This Lazy query output cache was initialized with unknown type");
        }

        return result;
    }
356465
public void setLastApplied(long index) {
    // Query callbacks for this session are added to the indexQueries map to be executed once the required index
    // for the query is reached. For each increment of the index, trigger query callbacks that are dependent
    // on the specific index.
    for (long i = lastApplied + 1; i <= index; i++) {
      lastApplied = i;
      List<Runnable> queries = this.indexQueries.remove(lastApplied);
      if (queries != null) {
        for (Runnable query : queries) {
          query.run();
        }
      }
    }
  }
1327777
private void setProperty(ColumnFamilyHandle handle, String property, RocksDBNativeMetricView metricView) {
		if (metricView.isClosed()) {
			return;
		}
		try {
			synchronized (lock) {
				if (rocksDB != null) {
					long value = rocksDB.getLongProperty(handle, property);
					metricView.setValue(value);
				}
			}
		} catch (RocksDBException e) {
			metricView.close();
			LOG.warn("Failed to read native metric %s from RocksDB", property, e);
		}
	}
1304723
public void setQuery( String query )
    {
        _parameters = null;

        if ( query == null || query.length() == 0 ) { return; }

        for ( StringTokenizer tok = new StringTokenizer( query, "&" ); tok.hasMoreElements(); )
        {
            String queryItem = tok.nextToken();

            if ( queryItem.startsWith( "amp;" ) )
            {
                queryItem = queryItem.substring( 4 );
            }

            int eq = queryItem.indexOf( '=' );
            if ( eq != -1 )
            {
                addParameter( queryItem.substring( 0, eq ) , queryItem.substring( eq + 1 ), true );
            }
            else
            {
                addParameter( queryItem, null, true );
            }
        }
    }
3802
protected final void setJpqlParameters(final Query query, final StreamId streamId) {
        final List<KeyValue> params = new ArrayList<>(streamId.getParameters());
        if (params.size() == 0) {
            params.add(new KeyValue("streamName", streamId.getName()));
        }
        for (int i = 0; i < params.size(); i++) {
            final KeyValue param = params.get(i);
            query.setParameter(param.getKey(), param.getValue());
        }
    }
1115234
public void updateStat(final int query_index, final QueryStat name, 
      final long value) {
    Map<QueryStat, Long> qs = query_stats.get(query_index);
    long cum_time = value;
    if (qs == null) {
      qs = new HashMap<QueryStat, Long>();
      query_stats.put(query_index, qs);
    }
    
    if (qs.containsKey(name)) {
      cum_time += qs.get(name);
    }
    qs.put(name, cum_time);
  }
1094290
private Parameter<?> getParameter(int index)
	{
		if (index < 0 || index >= listParams.size())
			return null;
		return listParams.get(index);
	}
1182369
function setMetricQuery( query ) {
		query.metric( metric )
			.aggregator( aggregator )
			.downsample( downsample )
			.rate( rate )
			.rateOptions({
				'counter': counter,
				'counterMax': counterMax,
				'resetValue': resetValue
			})
			.tags( 'nid', tags.nid );
	}
600121
private void queryMetrics(final MetricQueryServiceGateway queryServiceGateway) {
		LOG.debug("Query metrics for {}.", queryServiceGateway.getAddress());

		queryServiceGateway
			.queryMetrics(timeout)
			.whenCompleteAsync(
				(MetricDumpSerialization.MetricSerializationResult result, Throwable t) -> {
					if (t != null) {
						LOG.debug("Fetching metrics failed.", t);
					} else {
						metrics.addAll(deserializer.deserialize(result));
					}
				},
				executor);
	}