Set counter's value to expected.

@param value
@throws MemcachedException
@throws InterruptedException
@throws TimeoutException
489449
public void set(long value) throws MemcachedException, InterruptedException, TimeoutException {
    this.memcachedClient.set(this.key, 0, String.valueOf(value));
  }
445148
final public void decrement(long time, long value) {
        if (!enabled)
            return;

        lastSampleTime = time;
        if (!sync) {
            count -= value;
        } else {
            synchronized (this) {
                count -= value;
            }
        }
    }
1051500
public final void setGuaranteedRemoteGetStartTick(long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setGuaranteedRemoteGetStartTick", Long.valueOf(value));
        getHdr2().setLongField(JsHdr2Access.GUARANTEEDREMOTEGET_SET_STARTTICK, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setGuaranteedRemoteGetStartTick");
    }
970966
public void setFMDate(String value) {
        final long multiplier = 100000000;
        Calendar cal = Calendar.getInstance();
        double val = Double.parseDouble(value);
        
        if (val < 1000000D || val > 9999999D) {
            throw new IllegalArgumentException();
        }
        
        long date = (long) Math.floor(val * multiplier);
        hasTime = date % multiplier != 0;
        date = setCalendar(cal, Calendar.MILLISECOND, date, 100);
        date = setCalendar(cal, Calendar.SECOND, date, 100);
        date = setCalendar(cal, Calendar.MINUTE, date, 100);
        date = setCalendar(cal, Calendar.HOUR_OF_DAY, date, 100);
        date = setCalendar(cal, Calendar.DAY_OF_MONTH, date, 100);
        date = setCalendar(cal, Calendar.MONTH, date - 1, 100);
        date = setCalendar(cal, Calendar.YEAR, date + 1700, 10000);
        setTime(cal.getTimeInMillis());
    }
636063
@Override
    public void set(String key, Object value, int expiration) {
        Element element = new Element(key, value);
        if (expiration == 0) {
            element.setEternal(true);
        }
        element.setTimeToLive(expiration);
        cache.put(element);
    }
323097
public final void setExceptionTimestamp(long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setExceptionTimestamp", Long.valueOf(value));
        boolean wasEmpty = (getHdr2().getChoiceField(JsHdr2Access.EXCEPTION) == JsHdr2Access.IS_EXCEPTION_EMPTY);
        getHdr2().setLongField(JsHdr2Access.EXCEPTION_DETAIL_TIMESTAMP, value);
        if (wasEmpty)
        {
            // Need to mark the optional exception fields as empty
            getHdr2().setChoiceField(JsHdr2Access.EXCEPTION_DETAIL_PROBLEMDESTINATION, JsHdr2Access.IS_EXCEPTION_DETAIL_PROBLEMDESTINATION_EMPTY);
            getHdr2().setChoiceField(JsHdr2Access.EXCEPTION_DETAIL_PROBLEMSUBSCRIPTION, JsHdr2Access.IS_EXCEPTION_DETAIL_PROBLEMSUBSCRIPTION_EMPTY);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setExceptionTimestamp");
    }
555983
final public void increment(long time, long value) {
        if (!enabled)
            return;

        lastSampleTime = time;
        if (!sync) {
            count += value;
        } else {
            synchronized (this) {
                count += value;
            }
        }
    }
293689
public void set(final T value) {
		if (this.value.compareAndSet(null, value)) {
			this.listeners.clear();
			this.cdl.countDown();
		}
	}
255829
public void set(T newValue) throws IOException, InterruptedException {
    try {
      set0(newValue);
    } catch (InterruptedIOException | ClosedByInterruptException e) {
      throw new InterruptedException(e.getMessage());
    }
  }
951468
public void setValue(Object value, long timeout) {
		_value = value;
		_expiration = System.currentTimeMillis() + timeout;
	}
243842
public final void setMessageWaitTime(long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setMessageWaitTime", Long.valueOf(value));
        /* Just set the transient value - it will be written back later */
        cachedMessageWaitTime = Long.valueOf(value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setMessageWaitTime");
    }
365559
public void onBeforeAdd(E value) {
        long freeHeapSpace = RUNTIME.freeMemory() + (RUNTIME.maxMemory() - RUNTIME.totalMemory());

        // start flow control if we cross the threshold
        if (freeHeapSpace < minimumHeapSpaceBeforeFlowControl) {

            // x indicates how close we are to overflowing the heap
            long x = minimumHeapSpaceBeforeFlowControl - freeHeapSpace;

            long delay = Math.round(x * (x * c)); // delay = x^2 * c

            try {
                Thread.sleep(delay);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
572849
public final void setRedeliveredCount(int value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setRedeliveredCount", Integer.valueOf(value));
        getHdr2().setIntField(JsHdr2Access.REDELIVEREDCOUNT, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setRedeliveredCount");
    }
760580
public function put($key, $value, $minutes = 0) {
        $this->memcached->set($key, serialize($value), $minutes * 60);
    }
616320
protected void putToCache(String cacheName, String key, Object value) {
        putToCache(cacheName, key, value, 0);
    }
992061
public void set(MessageMap value) {
    if (array != null)
      array[value.multiChoice.intValue()] = value;
    else
      hashtable.put(value.multiChoice, value);
  }
891184
public final void setRemainingTimeToLive(long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setRemainingTimeToLive", Long.valueOf(value));
        if (value < 0) {
            getHdr2().setLongField(JsHdr2Access.TIMETOLIVE, 0);
        }
        else if (value == 0) {
            getHdr2().setLongField(JsHdr2Access.TIMETOLIVE, 1);
        }
        else {
            long ttl = getMessageWaitTime().longValue() + value;
            /* Call setTimeToLive so that bounds checking takes place for an API message. */
            setTimeToLive(ttl);
        }
        wasTimeToLiveChanged = true;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setRemainingTimeToLive");
    }