Increase a request count for a resource for this session.  It cannot
exceed the max concurrent request count.

@param type Resource type
@param delta incremental request count
438184
protected void incrementRequestCount(ResourceType type, int delta) {
    Context c = getContext(type);
    int newRequestCount = c.requestCount + delta;
    c.requestCount = newRequestCount;
    if (newRequestCount > c.maxConcurrentRequestCount) {
      c.maxConcurrentRequestCount = newRequestCount;
    }
  }
199159
public QueryParameters updateType(String key, Integer type) {
        this.types.put(processKey(key), type);

        return this;
    }
1213868
private void addClassInfoAndIncrementCount(Class<?> type, ClassInfo classInfo) {
        classes.putIfAbsent(type, classInfo);
        classSerializationCount.compute(type, BeanReferences::incrementOrOne);
    }
715457
public final void increaseScheduledWriteBytes(int increment) {
        scheduledWriteBytes.addAndGet(increment);
        if (getService() instanceof AbstractIoService) {
            getService().getStatistics().increaseScheduledWriteBytes(increment);
        }
    }
5416
synchronized void increaseLength(long delta) {
        Preconditions.checkState(!this.sealed, "Cannot increase the length of a sealed SegmentChunk.");
        Preconditions.checkArgument(delta >= 0, "Cannot decrease the length of a SegmentChunk.");
        this.length += delta;
    }
673878
public void setScalableType(com.google.api.ads.admanager.axis.v201805.ScalableType scalableType) {
        this.scalableType = scalableType;
    }
945524
public static void addResource(String type, String id, String url){
        
        
        //add the new resource to the list of the managed resources
        logger.info("Adding the following new resource to the Data Collector Descriptor: {}, {}", type, id);
        try {
            resources.put(new InternalComponent(type,id), new URL(url));
        } catch (MalformedURLException e) {
            logger.error(e.getMessage(), e.getCause());
        }
        
        logger.info("Currently managed resources...");
        
        for(Resource r: _INSTANCE.getResources()){
            logger.info(r.getType() + " " + r.getId() + "\n");
        }
        
        // re-Build the DCDescriptor
        DCDescriptor dcDescriptor = new DCDescriptor();

        dcDescriptor.addMonitoredResources(_INSTANCE.getProvidedMetrics(), _INSTANCE.getResources());
        dcDescriptor.addResources(_INSTANCE.getResources());

        dcDescriptor
                .setConfigSyncPeriod(CONFIG_SYNC_PERIOD != null ? CONFIG_SYNC_PERIOD
                        : DEFAULT_CONFIG_SYNC_PERIOD);

        dcDescriptor.setKeepAlive(KEEP_ALIVE != null ? KEEP_ALIVE
                : (DEFAULT_CONFIG_SYNC_PERIOD + 15));
        
        logger.info("Setting the new DCDescriptor...");
        
        _INSTANCE.dcAgent.setDCDescriptor(dcDescriptor);
        
        //re-start the monitoring
        _INSTANCE.monitoringStarted = false;
        startMonitoring();

        
    }
835110
private void addQueryParams(final Request request) {
        if (type != null) {
            for (Channel.ChannelType prop : type) {
                request.addQueryParam("Type", prop.toString());
            }
        }

        if (getPageSize() != null) {
            request.addQueryParam("PageSize", Integer.toString(getPageSize()));
        }
    }
1344015
public boolean updateIOCounts(long byteCount, int type) {

        setLastIOAmt(byteCount);
        setIODoneAmount(getIODoneAmount() + byteCount);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            String dbString = null;
            if (type == 0) {
                dbString = "Read ";
            } else {
                dbString = "Wrote ";
            }
            SocketIOChannel channel = getTCPConnLink().getSocketIOChannel();
            Tr.event(tc, dbString + byteCount + "(" + +getIODoneAmount() + ")" + " bytes, " + getIOAmount() + " requested on local: " + channel.getSocket().getLocalSocketAddress()
                         + " remote: " + channel.getSocket().getRemoteSocketAddress());
        }

        boolean rc;
        if (getIODoneAmount() >= getIOAmount()) {
            // read is complete on current thread
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                if (type == 0) {
                    Tr.debug(tc, "read complete, at least minimum amount of data read");
                } else {
                    Tr.debug(tc, "write complete, at least minimum amount of data written");
                }
            }
            rc = true;
        } else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                if (type == 0) {
                    Tr.debug(tc, "read not complete, more data needed");
                } else {
                    Tr.debug(tc, "write not complete, more data needs to be written");
                }
            }
            rc = false;
        }
        return rc;
    }
866325
public final void increaseWrittenBytes(int increment, long currentTime) {
        if (increment <= 0) {
            return;
        }

        writtenBytes += increment;
        lastWriteTime = currentTime;
        idleCountForBoth.set(0);
        idleCountForWrite.set(0);

//        if (getService() instanceof AbstractIoService) {
//            ((AbstractIoService) getService()).getStatistics().increaseWrittenBytes(increment, currentTime);
//        }

        increaseScheduledWriteBytes(-increment);
    }
145914
public void deltaTotalGetTime(long delta)
   {
      if (enabled.get() && delta > 0)
      {
         totalGetTime.addAndGet(delta);
         totalGetTimeInvocations.incrementAndGet();

         if (delta > maxGetTime.get())
            maxGetTime.set(delta);
      }
   }
122837
public final void setProgressBarType(final ProgressBarType type) {
		ProgressBarType currentType = getProgressBarType();
		ProgressBarType typeToSet = type == null ? DEFAULT_TYPE : type;
		if (typeToSet != currentType) {
			getOrCreateComponentModel().barType = typeToSet;
		}
	}
1091798
public void addType(String type) {
        try {
            messageCreators.add(Class.forName(type).newInstance());
        } catch (ClassNotFoundException | IllegalAccessException e) {
            throw new CitrusRuntimeException("Unable to access message creator type: " + type, e);
        } catch (InstantiationException e) {
            throw new CitrusRuntimeException("Unable to create  message creator instance of type: " + type, e);
        }
    }
80909
public final void increaseReadBytes(long increment, long currentTime) {
        if (increment <= 0) {
            return;
        }

        readBytes += increment;
        lastReadTime = currentTime;
        idleCountForBoth.set(0);
        idleCountForRead.set(0);

//        if (getService() instanceof AbstractIoService) {
//            ((AbstractIoService) getService()).getStatistics().increaseReadBytes(increment, currentTime);
//        }
    }
811796
public void refresh(ExtensionComponentSet delta) {
        boolean fireOnChangeListeners = false;
        synchronized (getLoadLock()) {
            if (extensions==null)
                return;     // not yet loaded. when we load it, we'll load everything visible by then, so no work needed

            Collection<ExtensionComponent<T>> found = load(delta);
            if (!found.isEmpty()) {
                List<ExtensionComponent<T>> l = Lists.newArrayList(extensions);
                l.addAll(found);
                extensions = sort(l);
                fireOnChangeListeners = true;
            }
        }
        if (fireOnChangeListeners) {
            fireOnChangeListeners();
        }
    }
1077486
public Long getCount(String type) {
		MultivaluedMap<String, String> params = new MultivaluedHashMap<>();
		params.putSingle(Config._TYPE, type);
		Pager pager = new Pager();
		getItems(find("count", params), pager);
		return pager.getCount();
	}
532174
public void incrementRefCount() {
        synchronized (this.cf) {
            this.refCount++;
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Increased refcount; " + this);
            }
        }
    }