Add an ExpirableReference to the expiry index.
@param expirable an ExpirableReference.
@return true if the object was added to the index successfully.
12458
public boolean put(ExpirableReference expirable)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "put", "ObjId=" + expirable.getID() + " ET=" + expirable.getExpiryTime());

        boolean reply = tree.insert(expirable);
        if (reply)
        {
            size++;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "put", "reply=" + reply);
        return reply;
    }
743909
@GuardedBy("evictionLock")
  void expireEntries() {
    long now = expirationTicker().read();
    expireAfterAccessEntries(now);
    expireAfterWriteEntries(now);
    expireVariableEntries(now);
  }
938552
@Override
    public void setHiddenExpiryTime(long expiryTime)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(tc, "setHiddenExpiryTime", Long.valueOf(expiryTime));
        }
        hiddenExpiryTime = expiryTime;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.exit(tc, "setHiddenExpiryTime");
        }
    }
352890
@Deprecated
  public final UserManagedCacheBuilder<K, V, T> withExpiry(org.ehcache.expiry.Expiry<? super K, ? super V> expiry) {
    if (expiry == null) {
      throw new NullPointerException("Null expiry");
    }
    UserManagedCacheBuilder<K, V, T> otherBuilder = new UserManagedCacheBuilder<>(this);
    otherBuilder.expiry = ExpiryUtils.convertToExpiryPolicy(expiry);
    return otherBuilder;
  }
19342
public void setExpiry(Date expire) {
        addField(SubscribeOptionFields.expire, FormField.Type.text_single);
        setAnswer(SubscribeOptionFields.expire.getFieldName(), XmppDateTime.formatXEP0082Date(expire));
    }
67795
public static <T> Expiring<T> of(Iterable<T> iterable) {
		return of(checkNotNull(iterable).iterator());
	}
425390
public boolean addRef(Object object)
        throws IOException
    {
        if (_refs == null)
            _refs = new IdentityHashMap();

        Integer ref = (Integer) _refs.get(object);

        if (ref != null) {
            int value = ref.intValue();

            writeRef(value);
            return true;
        }
        else {
            _refs.put(object, new Integer(_refs.size()));

            return false;
        }
    }
975224
@SuppressWarnings("unchecked")
    public void addPersistentDestinationData(HashMap hm)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "addPersistentDestinationData", hm);

        super.addPersistentData(hm);

        // Is the destination marked as to be deleted
        hm.put("toBeDeleted", Boolean.valueOf(_toBeDeleted));

        // Is the destination temporary
        hm.put("isTemporary", Boolean.valueOf(_isTemporary));

        hm.put("toBeIgnored", Boolean.valueOf(_toBeIgnored));

        // Is the destination localised on the home ME
        //hm.put("isLocal", Boolean.valueOf(isLocal));

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "addPersistentDestinationData");
    }
312199
public void extendDuration(int extend) {
        int passed = timePassed();
        mDuration = passed + extend;
        mDurationReciprocal = 1.0f / mDuration;
        mFinished = false;
    }
634157
public function append($key, $value, $expiry = 0)
    {
        $operation = __FUNCTION__;
        $arguments = (new OperationArguments($operation))->setKey($key)->setValue($value);
        if (func_num_args() > 2) {
            $arguments->setExpiry($expiry);
        }
        return $this->doOperation($operation, $arguments);
    }
991097
boolean updateIndexEntry(S userStorable, S oldUserStorable) throws PersistException {
        Storable newIndexEntry = makeIndexEntry(userStorable);

        if (oldUserStorable != null) deleteOldEntry: {
            Storable oldIndexEntry;
            try {
                oldIndexEntry = makeIndexEntry(oldUserStorable);
            } catch (PersistException e) {
                Throwable cause = e.getCause();
                if (cause instanceof IllegalArgumentException) {
                    // Can be caused by a corrupt master record, which is
                    // attempting do assign an illegal value to the index. There's
                    // no way to find the old index entry to delete.
                    break deleteOldEntry;
                }
                throw e;
            }

            if (oldIndexEntry.equalPrimaryKeys(newIndexEntry)) {
                // Index entry didn't change, so nothing to do. If the index
                // entry has a version, it will lag behind the master's version
                // until the index entry changes, at which point the version
                // will again match the master.
                return true;
            }

            oldIndexEntry.tryDelete();
        }

        return insertIndexEntry(userStorable, newIndexEntry);
    }
787174
public final <T> boolean add(String key, final int exp, final T value,
      final Transcoder<T> transcoder, final long timeout)
      throws TimeoutException, InterruptedException, MemcachedException {
    key = this.preProcessKey(key);
    return this.add0(key, exp, value, transcoder, timeout);
  }
1052596
public function update( $key, $value = '', $expiry = '' ) {
		if ( $this->is_option ) {
			return $this->update_option( $key, $value, $expiry );
		}
		return true;
	}
1116411
@SuppressWarnings({"fallthrough", "PMD.MissingBreakInSwitch",
    "PMD.SwitchStmtsShouldHaveDefault", "NullAway"})
  private @Nullable Expirable<V> postProcess(Expirable<V> expirable,
      EntryProcessorEntry<K, V> entry, long currentTimeMS) {
    switch (entry.getAction()) {
      case NONE:
        if (expirable == null) {
          return null;
        } else if (expirable.isEternal()) {
          return expirable;
        }
        if (currentTimeMS == 0) {
          currentTimeMS = currentTimeMillis();
        }
        if (expirable.hasExpired(currentTimeMS)) {
          dispatcher.publishExpired(this, entry.getKey(), expirable.get());
          statistics.recordEvictions(1);
          return null;
        }
        return expirable;
      case READ: {
        setAccessExpirationTime(expirable, 0L);
        return expirable;
      }
      case CREATED:
        this.publishToCacheWriter(writer::write, () -> entry);
        // fall through
      case LOADED:
        statistics.recordPuts(1L);
        dispatcher.publishCreated(this, entry.getKey(), entry.getValue());
        return new Expirable<>(entry.getValue(), getWriteExpireTimeMS(/* created */ true));
      case UPDATED: {
        statistics.recordPuts(1L);
        publishToCacheWriter(writer::write, () -> entry);
        dispatcher.publishUpdated(this, entry.getKey(), expirable.get(), entry.getValue());
        long expireTimeMS = getWriteExpireTimeMS(/* created */ false);
        if (expireTimeMS == Long.MIN_VALUE) {
          expireTimeMS = expirable.getExpireTimeMS();
        }
        return new Expirable<>(entry.getValue(), expireTimeMS);
      }
      case DELETED:
        statistics.recordRemovals(1L);
        publishToCacheWriter(writer::delete, entry::getKey);
        dispatcher.publishRemoved(this, entry.getKey(), entry.getValue());
        return null;
    }
    throw new IllegalStateException("Unknown state: " + entry.getAction());
  }
1308124
public boolean addReference(ServiceReference<T> reference) {
        if (reference == null)
            return false;

        ConcurrentServiceReferenceElement<T> element = new ConcurrentServiceReferenceElement<T>(referenceName, reference);

        synchronized (elementMap) {
            ConcurrentServiceReferenceElement<T> oldElement = elementMap.put(reference, element);
            if (oldElement != null) {
                if (!element.getRanking().equals(oldElement.getRanking())) {
                    elementSetUnsorted = true;
                }
                return true;
            }

            elementSet.add(element);
        }
        return false;
    }
752718
public boolean isIndexImmutable(Object request) {
        
        if(!this.enabled) {
            return false;
        }
        
        if(immutableIndicesPatterns.isEmpty()) {
            return false;
        }
        
        final Resolved resolved = irr.resolveRequest(request);
        final Set<String> allIndices = resolved.getAllIndices();
        
        //assert allIndices.size() == 1:"only one index here, not "+allIndices;
        //assert allIndices.contains("_all"):"no _all in "+allIndices;
        //assert allIndices.contains("*"):"no * in "+allIndices;
        //assert allIndices.contains(""):"no EMPTY in "+allIndices;

        return WildcardMatcher.matchAny(immutableIndicesPatterns, allIndices);
    }
1196193
@Override
    public Builder expirationTime(long exp) throws InvalidClaimException {

        long currTime = System.currentTimeMillis() / 1000;
        if (exp >= currTime) {
            // if (exp > (new Date()).getTime()) {
            claims.put(Claims.EXPIRATION, Long.valueOf(exp));
        } else {
            // Expiration must be greater than the current time
            String err = Tr.formatMessage(tc, "JWT_INVALID_EXP_CLAIM_ERR", new Object[] { Claims.EXPIRATION, exp, JwtUtils.getDate(exp), JwtUtils.getDate(currTime) });
            throw new InvalidClaimException(err);
        }
        return this;
    }