Register statistic information about usage of index in {@link OProfiler}.

@param index
which usage is registering.
14835
private void updateStatistic(OIndex<?> index) {
    if (OProfiler.getInstance().isRecording()) {
      OProfiler.getInstance().updateCounter("Query.indexUsage", 1);
      final int paramCount = index.getDefinition().getParamCount();
      if (paramCount > 1) {
        OProfiler.getInstance().updateCounter("Query.compositeIndexUsage", 1);
        OProfiler.getInstance().updateCounter("Query.compositeIndexUsage." + paramCount, 1);
      }
    }
  }
1095008
public void clickOnImageButton(int index) {
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "clickOnImageButton("+index+")");
		}
		
		clicker.clickOn(ImageButton.class, index);
	}
530313
public boolean isExistingIndex(String index) throws IOException {
        logger.debug("is existing index [{}]", index);
        try {
            Response restResponse = lowLevelClient.performRequest("GET", "/" + index);
            logger.trace("get index metadata response: {}", asMap(restResponse));
            return true;
        } catch (ResponseException e) {
            if (e.getResponse().getStatusLine().getStatusCode() == 404) {
                logger.debug("index [{}] does not exist", index);
                return false;
            }
            throw e;
        }
    }
949706
public void setScribeIndex(ScribeIndex index) {
		this.index = index;
		serializer.setScribeIndex(index);
		deserializer.setScribeIndex(index);
	}
605550
public void addEdge(int index, ReuseEdge<S, I, O> edge) {
        this.edges[index] = edge;
    }
1191521
private void addIndex(final String index) throws IOException {

        logger.info("Adding index '{}'...", index);

        String resourcePath = "/" + index;

        if (doesResourceNotExist(resourcePath)) {

            try {
                elasticSearchAdminClient.performRequest(HttpMethod.PUT, resourcePath);

                logger.info("Added '{}' index", index);
            } catch (ResponseException e) {

                boolean errorCreatingIndex = true;

                Response errorResponse = e.getResponse();
                if (errorResponse.getStatusLine().getStatusCode() == HttpStatus.SC_BAD_REQUEST) {
                    JsonNode root = objectMapper.readTree(EntityUtils.toString(errorResponse.getEntity()));
                    String errorCode = root.get("error").get("type").asText();
                    if ("index_already_exists_exception".equals(errorCode)) {
                        errorCreatingIndex = false;
                    }
                }

                if (errorCreatingIndex) {
                    throw e;
                }
            }
        } else {
            logger.info("Index '{}' already exists", index);
        }
    }
1301752
public void selectByIndex(int index) {
        getDispatcher().beforeSelect(this, index);
        
        new Select(getElement()).selectByIndex(index);
        if (Config.getBoolConfigProperty(ConfigProperty.ENABLE_GUI_LOGGING)) {
            logUIActions(UIActions.SELECTED, Integer.toString(index));
        }
        
        getDispatcher().afterSelect(this, index);
    }
417485
public void addStat(final int query_index, final QueryStat name, 
      final long value) {
    Map<QueryStat, Long> qs = query_stats.get(query_index);
    if (qs == null) {
      qs = new HashMap<QueryStat, Long>();
      query_stats.put(query_index, qs);
    }
    qs.put(name, value);
  }
1120289
public synchronized String getClassification(int index)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getClassification", Integer.valueOf(index));
    String name = classificationNames.get(index);
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getClassification", name);
    
    return name;
  }
310650
public static void registerStatistics(String category, Statistics global, Map<String, Statistics> allStatistics)
   {
      if (category == null || category.length() == 0)
      {
         throw new IllegalArgumentException("The category of the statistics cannot be empty");
      }
      if (allStatistics == null || allStatistics.isEmpty())
      {
         throw new IllegalArgumentException("The list of statistics " + category + " cannot be empty");
      }
      PrintWriter pw = null;
      if (PERSISTENCE_ENABLED)
      {
         pw = initWriter(category);
         if (pw == null)
         {
            LOG.warn("Cannot create the print writer for the statistics " + category);
         }
      }
      startIfNeeded();
      synchronized (JCRStatisticsManager.class)
      {
         Map<String, StatisticsContext> tmpContexts = new HashMap<String, StatisticsContext>(CONTEXTS);
         StatisticsContext ctx = new StatisticsContext(pw, global, allStatistics);
         tmpContexts.put(category, ctx);
         if (pw != null)
         {
            // Define the file header
            printHeader(ctx);
         }
         CONTEXTS = Collections.unmodifiableMap(tmpContexts);
      }
   }
1336031
private void recordIndex(int index) {
        stateLock.writeLock().lock();
        try {
            int insertionPoint = -Arrays.binarySearch(effectiveIndex, index) - 1;
            System.arraycopy(effectiveIndex, insertionPoint, effectiveIndex, insertionPoint + 1, effectiveIndex.length - insertionPoint - 1);
            effectiveIndex[insertionPoint] = index;
        } finally {
            stateLock.writeLock().unlock();
        }
    }
715495
public void remove(int index) {
    ensureMutableMessageList();
    messages.remove(index);
    if (builders != null) {
      SingleFieldBuilder<MType, BType, IType> entry =
          builders.remove(index);
      if (entry != null) {
        entry.dispose();
      }
    }
    onChanged();
    incrementModCounts();
  }
87966
def register_index(self, index):
    

    self._indexes[index._name] = index
    self.create_index(index)
    return index
946852
public void overrideMinorityDefault(int index) {
        if (targetMinorityDistMap.containsKey(index)) {
            minorityLabelMap.put(index, 0);
        } else {
            throw new IllegalArgumentException(
                            "Index specified is not contained in the target minority distribution map specified with the preprocessor. Map contains "
                                            + ArrayUtils.toString(targetMinorityDistMap.keySet().toArray()));
        }
    }
1287113
public void addItem (int index, T item)
    {
        if (_items == null) {
            return;
        }
        _items.add(index, item);
    }
1085230
void register(ResourceMonitorImpl monitorImpl) throws IOException
   {
      Path path = monitorImpl.getResourcePath();
      registerAll(path, monitorImpl);
   }
928507
public boolean create(String index) {
        CreateIndexRequestBuilder createIndexRequestBuilder =
                admin().indices().prepareCreate(index);
        return JMElasticsearchUtil.logRequestQueryAndReturn("create",
                createIndexRequestBuilder,
                createIndexRequestBuilder.execute())
                .isAcknowledged();
    }