Adds an internal tracking reference for the given quota.
161404
def add_quota(self, quota):
        """"""
        if quota.limit in (None, -1, float('inf')):
            # Handle "unlimited" quotas.
            self.usages[quota.name]['quota'] = float("inf")
            self.usages[quota.name]['available'] = float("inf")
        else:
            self.usages[quota.name]['quota'] = int(quota.limit)
649606
@Override
    public void addConsumerPointMatchTarget(
                                            DispatchableKey consumerPointData,
                                            SIBUuid8 cmUuid,
                                            SelectionCriteria criteria)
                    throws SIDiscriminatorSyntaxException, SISelectorSyntaxException, SIResourceException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(
                        tc,
                        "addConsumerPointMatchTarget",
                        new Object[] { consumerPointData, criteria });

        _targetDestinationHandler.addConsumerPointMatchTarget(consumerPointData,
                                                              cmUuid,
                                                              criteria);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "addConsumerPointMatchTarget");
    }
954537
def add_tracker(wfid, action, tracker_id, conditions, msg)

      tracker_id ||= [
        'tracker', wfid, action,
        Ruote.generate_subid(conditions.hash.to_s + msg.hash.to_s)
      ].collect(&:to_s).join('_')

      conditions =
        conditions && conditions.remap { |(k, v), h| h[k] = Array(v) }

      doc = @context.storage.get_trackers

      doc['trackers'][tracker_id] =
        { 'wfid' => wfid,
          'action' => action,
          'id' => tracker_id,
          'conditions' => conditions,
          'msg' => msg }

      r = @context.storage.put(doc)

      add_tracker(wfid, action, tracker_id, conditions, msg) if r
        # the put failed, have to redo the work

      tracker_id
    end
376537
public void addData(int index, byte[] data) throws InternalLogException
  {
    if (tc.isEntryEnabled()) Tr.entry(tc, "addData",new java.lang.Object[] {new Integer(index), RLSUtils.toHexString(data,RLSUtils.MAX_DISPLAY_BYTES), this});

    // If the parent recovery log instance has experienced a serious internal error then prevent
    // this operation from executing.
    if (_recLog.failed())
    {
      if (tc.isEntryEnabled()) Tr.exit(tc, "addData",this);
      throw new InternalLogException(null);
    }

    // we use an index value of 0 to indicate that it is a singledata RUsection
    // so adjust now ... if (!_singleData) or if(index != 0)
    if (index > 0) index--;         

    // list items may be added in any order, so it may be necessary to (temporarily) pad the list
    final int currentSize = _writtenData.size();
    if (index == currentSize)
        _writtenData.add(/*index,*/ data);
    else if (index < currentSize)
    {
        if (tc.isDebugEnabled()) Tr.debug(tc, "NMTEST: Replacing item (expect trace 'null') at index: " + index, _writtenData.get(index));
        _writtenData.set(index, data);
    }
    else // index > currentSize
    {
        if (tc.isDebugEnabled()) Tr.debug(tc, "NMTEST: Adding null elements: " + (index-currentSize));
        while (index-- > currentSize)
            _writtenData.add(null);

        _writtenData.add(data);        
    }

    // set lastdata.  This method is called during recovery and we shouldn't get asked for
    // any data until all log records are read.  So set lastdata to be the item at the current size
    // of the array.  Items may be added in random order, so lastitem will be correct when
    // all items have been added
    _lastDataItem = (byte[]) _writtenData.get(_writtenData.size() -1);

    if (tc.isEntryEnabled()) Tr.exit(tc, "addData");
  }
310593
private void addInternal(int i, Composite start, Composite end, long markedAt, int delTime)
    {
        assert i >= 0;

        if (size == capacity())
            growToFree(i);
        else if (i < size)
            moveElements(i);

        setInternal(i, start, end, markedAt, delTime);
        size++;
    }
270435
public void trackers(List<String> value) {
        string_vector v = new string_vector();

        for (String s : value) {
            v.push_back(s);
        }

        p.set_trackers(v);
    }
516832
public void addTrace(LogTrace<E> trace) throws ParameterException {
                Validate.notNull(trace);
                trace.setCaseNumber(traces.size() + 1);
                traces.add(trace);
                summary.addTrace(trace);
                if (!distinctTraces.add(trace)) {
                        for (LogTrace<E> storedTrace : traces) {
                                if (storedTrace.equals(trace)) {
                                        storedTrace.addSimilarInstance(trace.getCaseNumber());
                                        trace.addSimilarInstance(storedTrace.getCaseNumber());
                                }
                        }
                }
        }
103349
void internalAddChange(String valuePath, String attributeName, int valueIndex, ChangeType changeType) {

        m_changeTimer = null;
        //TODO: keep the IDs, otherwise redo will not work
        CmsEntity currentData = m_entity.cloneEntity();
        if (!currentData.equals(m_current.getEntityData())) {
            m_undo.push(m_current);
            m_current = new Change(currentData, valuePath, attributeName, valueIndex, changeType);
            m_redo.clear();
            fireStateChange();
        }
    }
1291474
void addNewTracker(TaskTracker taskTracker) {
    TaskTrackerStatus status = taskTracker.getStatus();
    trackerExpiryQueue.add(status);

    //  Register the tracker if its not registered
    String hostname = status.getHost();
    if (getNode(status.getTrackerName()) == null) {
      // Making the network location resolution inline ..
      resolveAndAddToTopology(hostname);
    }

    // add it to the set of tracker per host
    Set<TaskTracker> trackers = hostnameToTaskTracker.get(hostname);
    if (trackers == null) {
      trackers = Collections.synchronizedSet(new HashSet<TaskTracker>());
      hostnameToTaskTracker.put(hostname, trackers);
    }
    statistics.taskTrackerAdded(status.getTrackerName());
    getInstrumentation().addTrackers(1);
    LOG.info("Adding tracker " + status.getTrackerName() + " to host "
             + hostname);
    trackers.add(taskTracker);
  }
837843
def updateTraceCount(self):
        """"""
        self.ui.ntracesLbl.setNum(self.ui.trackview.model().traceCount())
588162
def reserved_quota(self, reserved_quota):
        
        if reserved_quota is None:
            raise ValueError("Invalid value for `reserved_quota`, must not be `None`")
        if reserved_quota is not None and reserved_quota < 0:
            raise ValueError("Invalid value for `reserved_quota`, must be a value greater than or equal to `0`")

        self._reserved_quota = reserved_quota
838081
protected PointTrack addNewTrack( int setIndex, double x , double y , Desc desc ) {
		PointTrack p = getUnused();
		p.set(x, y);
		((Desc)p.getDescription()).setTo(desc);
		if( checkValidSpawn(setIndex,p) ) {
			p.setId = setIndex;
			p.featureId = featureID++;

			sets[setIndex].tracks.add(p);
			tracksNew.add(p);
			tracksActive.add(p);
			tracksAll.add(p);
			return p;
		} else {
			unused.add(p);
			return null;
		}
	}
604809
private void addPathsWithUnknownChangedSize(ChangesItem changesItem, ItemState state)
   {
      if (!state.isPersisted() && (state.isDeleted() || state.isRenamed()))
      {
         String itemPath = getPath(state.getData().getQPath());

         for (String trackedPath : quotaPersister.getAllTrackedNodes(rName, wsName))
         {
            if (itemPath.startsWith(trackedPath))
            {
               changesItem.addPathWithUnknownChangedSize(itemPath);
            }
         }
      }
   }
233306
def track(cls, obj, ptr):
        
        cls._objects.add(cls(obj, ptr))
24945
public void addTraces(List<LogTrace<E>> traces) throws ParameterException {
                Validate.notNull(traces);
                for (LogTrace<E> trace : traces) {
                        addTrace(trace);
                }
        }
872850
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPMeasurementUnit addCPMeasurementUnit(
		CPMeasurementUnit cpMeasurementUnit) {
		cpMeasurementUnit.setNew(true);

		return cpMeasurementUnitPersistence.update(cpMeasurementUnit);
	}
99257
def add_relation(self, source, destination):
        """"""
        if self.in_sources(source):
            if self.forward[source] != destination:
                raise ValueError("Source is already in use. Destination does "
                                 "not match.")
            else:
                raise ValueError("Source-Destination relation already exists.")
        elif self.in_destinations(destination):
            raise ValueError("Destination is already in use. Source does not "
                             "match.")
        else:
            self.forward[source] = destination
            self.reverse[destination] = source