/*
setMaxInactToZero - called to set the max inactive time to zero for remote invalidateAll.
This will result in the session being invalidated by the next run of the background
invalidator.
480362
int setMaxInactToZero(String sessId, String appName) {
        final boolean trace = TraceComponent.isAnyTracingEnabled();

        int rc = -1;
        while (rc == -1) {
            if (trace && tc.isDebugEnabled())
                tcInvoke(tcSessionMetaCache, "get", sessId);

            ArrayList<?> oldValue = sessionMetaCache.get(sessId);

            if (trace && tc.isDebugEnabled())
                tcReturn(tcSessionMetaCache, "get", oldValue);

            SessionInfo sessionInfo = oldValue == null ? null : new SessionInfo(oldValue).clone();
            if (sessionInfo == null || sessionInfo.getMaxInactiveTime() == 0) {
                rc = 0;
            } else {
                sessionInfo.setMaxInactiveTime(0);
                ArrayList<Object> newValue = sessionInfo.getArrayList();

                if (trace && tc.isDebugEnabled())
                    tcInvoke(tcSessionMetaCache, "replace", sessId, oldValue, newValue);

                if (sessionMetaCache.replace(sessId, oldValue, newValue))
                    rc = 1;

                if (trace && tc.isDebugEnabled())
                    tcReturn(tcSessionMetaCache, "replace", rc == 1);
            }
        }

        return rc;
    }
1320185
private static <T extends Comparable<T>> void ensureValidRange(T min, T max) {
    if (min == null) {
      throw new InvalidOperationException("Null value for minimum.");
    }
    if (max == null) {
      throw new InvalidOperationException("Null value for maximum.");
    }
    if (min.compareTo(max) >= 0) {
      throw new InvalidOperationException("Invalid range: " + min + " >= " + max);
    }
  }
1346102
private void setMaxMin(IntervalRBTreeNode<T> n) {
    n.min = n.left;
    n.max = n.right;
    if (n.leftChild != null) {
      n.min = Math.min(n.min, n.leftChild.min);
      n.max = Math.max(n.max, n.leftChild.max);
    }
    if (n.rightChild != null) {
      n.min = Math.min(n.min, n.rightChild.min);
      n.max = Math.max(n.max, n.rightChild.max);
    }
  }
1073336
private void setInactivityTimer(long ms) {
        if (sessionInactivityTimer == null) {
            sessionInactivityTimer = new SessionInactivityTimer(sessionHandler.getScheduler(), this);
        }
        sessionInactivityTimer.setIdleTimeout(ms);
    }
956628
@Nonnull
  public CacheControlBuilder setMaxAge (@Nonnull final TimeUnit eTimeUnit, final long nDuration)
  {
    return setMaxAgeSeconds (eTimeUnit.toSeconds (nDuration));
  }
940941
public void setMaxActiveSessions( final int max ) {
        final int oldMaxActiveSessions = _maxActiveSessions;
        _maxActiveSessions = max;
        support.firePropertyChange( "maxActiveSessions",
                Integer.valueOf( oldMaxActiveSessions ),
                Integer.valueOf( _maxActiveSessions ) );
    }
879167
def SetMaxCurrent(self, i):
        
        if i < 0 or i > 8:
            raise MonsoonError(("Target max current %sA, is out of acceptable "
                                "range [0, 8].") % i)
        val = 1023 - int((i / 8) * 1023)
        self._SendStruct("BBB", 0x01, 0x0a, val & 0xff)
        self._SendStruct("BBB", 0x01, 0x0b, val >> 8)
1072126
public long maxTimestamp()
  {
    return ranges == null
            ? topLevel.markedForDeleteAt
            : Math.max(topLevel.markedForDeleteAt, ranges.maxMarkedAt());
  }
739516
public synchronized void setMaxInactiveInterval(int interval) {
        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[SET_MAX_INACTIVE_INTERVAL], "interval= " + interval);
        }
        if (_maxInactiveInterval != interval) {
            _maxInactiveInterval = interval;
            maxInactWriteHit = true;
        }
    }
66027
public void setMaxValue(final double VALUE) {
        if (Status.RUNNING == timeline.getStatus()) { timeline.jumpTo(Duration.ONE); }
        if (null == maxValue) {
            if (VALUE < getMinValue()) { setMinValue(VALUE); }
            _maxValue = Helper.clamp(getMinValue(), Double.MAX_VALUE, VALUE);
            setRange(_maxValue - getMinValue());
            if (Double.compare(originalMaxValue, Double.MAX_VALUE) == 0) originalMaxValue = _maxValue;
            if (Double.compare(originalThreshold, getThreshold()) > 0) { setThreshold(Helper.clamp(getMinValue(), _maxValue, originalThreshold)); }

            if (!valueProperty().isBound()) Gauge.this.setValue(Helper.clamp(getMinValue(), getMaxValue(), Gauge.this.getValue()));
            updateFormatString();
            fireUpdateEvent(RECALC_EVENT);
        } else {
            maxValue.set(VALUE);
        }
    }
183948
public void setMaxStorageStrategy(int requestedMaxStrategy)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this,
                        tc,
                        "setMaxStorageStrategy",
                        Integer.valueOf(requestedMaxStrategy));
        maxStorageStrategy = requestedMaxStrategy;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setMaxStorageStrategy");
    }
295174
public void setMax(java.lang.Object _max) {
		getStateHelper().put(PropertyKeys.max, _max);
	}
616316
private void setUnavailableUntil(long time, boolean isInit) //PM01373
	{
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
            logger.logp(Level.FINE, CLASS_NAME, "setUnavailableUntil", "setUnavailableUntil() : " + time);
        if(isInit){
			state = UNINITIALIZED_STATE;  //PM01373
		}
		else {
        state = UNAVAILABLE_STATE;
		}
        unavailableUntil = time;
        evtSource.onServletUnavailableForService(getServletEvent());
    }
300869
@Override
    public void setMaxInactiveInterval(int maxInactiveInterval) {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            StringBuffer sb = new StringBuffer(newValueString).append(maxInactiveInterval).append(oldValueString).append(_maxInactiveInterval).append(appNameAndIdString);
            LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, "setMaxInactiveInterval", sb.toString());
        }
        if (maxInactiveInterval <= 0) {
            _maxInactiveInterval = -1;
        } else {
            _maxInactiveInterval = maxInactiveInterval;
        }
    }
989059
@Nonnull
  public FineUploader5Retry setMaxAutoAttempts (@Nonnegative final int nMaxAutoAttempts)
  {
    ValueEnforcer.isGE0 (nMaxAutoAttempts, "MaxAutoAttempts");
    m_nRetryMaxAutoAttempts = nMaxAutoAttempts;
    return this;
  }
786012
@Override
    public void remoteInvalidate(String sessionId, boolean backendUpdate) {
        super.remoteInvalidate(sessionId, backendUpdate);

        if (backendUpdate) {
            ((CacheHashMap) _sessions).setMaxInactToZero(sessionId, getId());
        }

        // now clean this session out of cache -- we do this even if not doing db inval
        Enumeration<String> e = Collections.enumeration(Collections.singleton(sessionId));
        ((BackedHashMap) _sessions).handleDiscardedCacheItems(e);
    }
1297718
public void setLimit(int limit) {
        FailureInterpreter fi = getFailureInterpreter();
        if (!(fi instanceof DefaultFailureInterpreter)) {
            throw new IllegalStateException("setLimit() not supported: this CircuitBreaker's FailureInterpreter isn't a DefaultFailureInterpreter.");
        }
        ((DefaultFailureInterpreter)fi).setLimit(limit);
    }