Put fresh data into the histogram (or into the cache).

@param coord Coordinate
@param value Value
761328
public void putData(double coord, T value) {
    // Store in cache
    if(cachefill >= 0 && cachefill < cacheposs.length) {
      cacheposs[cachefill] = coord;
      cachevals[cachefill++] = cloneForCache(value);
      return;
    }
    if(coord == Double.NEGATIVE_INFINITY) {
      aggregateSpecial(value, 0);
    }
    else if(coord == Double.POSITIVE_INFINITY) {
      aggregateSpecial(value, 1);
    }
    else if(Double.isNaN(coord)) {
      aggregateSpecial(value, 2);
    }
    else {
      // super class will handle histogram resizing / shifting
      T exist = get(coord);
      data[getBinNr(coord)] = aggregate(exist, value);
    }
  }
1344196
public void fill(byte value)
    {
        int offset = 0;
        int length = size;
        long longValue = Longs.fromBytes(value, value, value, value, value, value, value, value);
        while (length >= SizeOf.SIZE_OF_LONG) {
            unsafe.putLong(base, address + offset, longValue);
            offset += SizeOf.SIZE_OF_LONG;
            length -= SizeOf.SIZE_OF_LONG;
        }

        while (length > 0) {
            unsafe.putByte(base, address + offset, value);
            offset++;
            length--;
        }
    }
1105811
public void add(
      double value
  )
  {
    readWriteLock.writeLock().lock();

    try {
      if (value < lowerLimit) {
        outlierHandler.handleOutlierAdd(false);
        return;
      } else if (value >= upperLimit) {
        outlierHandler.handleOutlierAdd(true);
        return;
      }

      count += 1;
      if (value > max) {
        max = value;
      }
      if (value < min) {
        min = value;
      }

      double valueRelativeToRange = value - lowerLimit;
      int targetBucket = (int) (valueRelativeToRange / bucketSize);

      if (targetBucket >= histogram.length) {
        targetBucket = histogram.length - 1;
      }

      histogram[targetBucket] += 1;
    }
    finally {
      readWriteLock.writeLock().unlock();
    }
  }
739984
public void insertInOrder(int value)
  {

    for (int i = 0; i < m_firstFree; i++)
    {
      if (value < m_map[i])
      {
        insertElementAt(value, i);

        return;
      }
    }

    addElement(value);
  }
705976
public void addNextValue(Object val) {
    if (this.numItems <= this.maxNumItems) {
      uniqItems.put(val.toString(), "1");
      this.numItems = this.uniqItems.size();
    }
  }
314248
protected final void putValue(final Entry e, final V _value) {
    if (!isUpdateTimeNeeded()) {
      insertOrUpdateAndCalculateExpiry(e, _value, 0, 0, 0 , INSERT_STAT_PUT);
    } else {
      long t = clock.millis();
      insertOrUpdateAndCalculateExpiry(e, _value, t, t, t, INSERT_STAT_PUT);
    }
  }
692318
public void accumulate(AverageData data,
                           Object value) {
        if (value != null) {
            data.count++;
            data.total = data.total.add( (BigDecimal) value );
        }
    }
818148
public final void addValue(@NonNull final String value) {
        Condition.INSTANCE.ensureNotNull(value, "The value may not be null");

        if (this.values != null) {
            if (this.values.add(value)) {
                if (persistSet(this.values)) {
                    notifyChanged();
                }
            }
        } else {
            Set<String> newValues = new HashSet<>();
            newValues.add(value);
            setValues(newValues);
        }
    }
1008215
@Override
  public void add(int value) {
    int key = toIntUnsigned(highbits(value));
    if (key != currentKey) {
      if (key < currentKey) {
        underlying.add(value);
        return;
      } else {
        appendToUnderlying();
        currentKey = key;
      }
    }
    C tmp = container.add(lowbits(value));
    if (tmp != container) {
      container = tmp;
    }
  }
712456
public void setXctCorrelationID(String value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setXctCorrelationID", value);

        if (value != null) {
            getHdr2().setField(JsHdr2Access.XCT_CORRELATION_ID_DATA, value);
        }
        else {
            getHdr2().setChoiceField(JsHdr2Access.XCT_CORRELATION_ID, JsHdr2Access.IS_XCT_CORRELATION_ID_EMPTY);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setXctCorrelationID");
    }
1278798
public void recordValue(final long value) throws ArrayIndexOutOfBoundsException {
        long criticalValueAtEnter = recordingPhaser.writerCriticalSectionEnter();
        try {
            activeHistogram.recordValue(value);
        } finally {
            recordingPhaser.writerCriticalSectionExit(criticalValueAtEnter);
        }
    }
41344
public void increment(double coord, double val) {
    int bin = getBinNr(coord);
    if (bin < 0) {
      if (size - bin > data.length) {
        // Reallocate. TODO: use an arraylist-like grow strategy!
        double[] tmpdata = new double[growSize(data.length, size - bin)];
        System.arraycopy(data, 0, tmpdata, -bin, size);
        data = tmpdata;
      } else {
        // Shift in place and clear head
        System.arraycopy(data, 0, data, -bin, size);
        Arrays.fill(data, 0, -bin, (double) 0);
      }
      data[0] = val;
      // Note that bin is negative, -bin is the shift offset!
      assert (data.length >= size - bin);
      offset -= bin;
      size -= bin;
      // TODO: modCounter++; and have iterators fast-fail
    } else if (bin >= data.length) {
      double[] tmpdata = new double[growSize(data.length, bin + 1)];
      System.arraycopy(data, 0, tmpdata, 0, size);
      tmpdata[bin] = val;
      data = tmpdata;
      size = bin + 1;
      // TODO: modCounter++; and have iterators fast-fail
      // Unset max value when resizing
      max = Double.MAX_VALUE;
    } else {
      if (bin >= size) {
        // TODO: reset bins to 0 first?
        size = bin + 1;
      }
      data[bin] += val;
    }
  }
1358931
public void setData(String key, Object value) {
        this.data = this.data.addData(key, value);
    }
945420
@Override
    public void put(Object key, Object value)
    {
        if(isAlive())
        ehcache.put(new Element(key, value));
    }
996222
public void addNextValue(Object val) {
    String newVal = val.toString();
    if (this.minVal == null || this.minVal.compareTo(newVal) > 0) {
      this.minVal = newVal;
    }
  }
620147
public void update(final float value) {
    if (Float.isNaN(value)) { return; }
    if (isEmpty()) {
      minValue_ = value;
      maxValue_ = value;
    } else {
      if (value < minValue_) { minValue_ = value; }
      if (value > maxValue_) { maxValue_ = value; }
    }
    if (levels_[0] == 0) {
      compressWhileUpdating();
    }
    n_++;
    isLevelZeroSorted_ = false;
    final int nextPos = levels_[0] - 1;
    assert levels_[0] >= 0;
    levels_[0] = nextPos;
    items_[nextPos] = value;
  }
1232989
private void cacheEntryInserted(String key, T value)
    {
        InfinispanCacheEntryEvent<T> event =
            new InfinispanCacheEntryEvent<>(new InfinispanCacheEntry<T>(this, key, value));

        T previousValue = this.preEventData.get(key);

        if (previousValue != null) {
            if (previousValue != value) {
                disposeCacheValue(previousValue);
            }

            sendEntryModifiedEvent(event);
        } else {
            sendEntryAddedEvent(event);
        }
    }