Adds {@link org.ehcache.expiry.Expiry} configuration to the returned builder.

@param expiry the expiry to use
@return a new builer with the added expiry

@deprecated Use {@link #withExpiry(ExpiryPolicy)} instead
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;
  }
323402
public function set($key, $value, $expiry = null)
	{
		// make sure we have a valid key
		if ($key === null)
		{
			throw new \RuntimeException('No valid key passed to set()');
		}

		// and store the value passed
		parent::set($this->prefixKey($key), $value);
	}
514016
function setExpiry(key, ms, req) {
  var rval = this.getRawKey(key);
  if(rval === undefined) return 0;
  // expiry is in the past or now, delete immediately
  // but return 1 to indicate the expiry was set
  if(ms <= Date.now()) {
    this.delKey(key, req);
    return 1;
  }
  if(!this._expires[key]) {
    this._ekeys.push(key);
  }
  this._expires[key] = ms;
  rval.e = ms;
  return 1;
}
800934
protected final long createExpiresHeader(final CacheControl cacheControl) {
		
		final Calendar expires = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
		
		if (cacheControl.maxAge() >= 0) {
			expires.add(Calendar.SECOND, cacheControl.maxAge());
		}
		
		return expires.getTime().getTime();
	}
1019833
@Override
    public void expireStorageProvider(String storageAccountId) {
        storageAccountId = checkStorageAccountId(storageAccountId);

        log.info("Expiring storage provider connection!  Storage account id: {}", storageAccountId);
        storageProviders.remove(storageAccountId);
    }
397226
@Override
    public void expire(K key, V val) {
        if (val == null) {
            return;
        }
        try {
            TupleInfo tupleInfo = (TupleInfo) val;
            FailSpoutMsg fail = new FailSpoutMsg(key, spout, tupleInfo, taskStats);

            disruptorEventQueue.publish(fail);
        } catch (Exception e) {
            LOG.error("expire error", e);
        }
    }
1115962
def get_backend_expiry(self, expiry=DEFAULT_EXPIRY):
        
        if expiry == DEFAULT_EXPIRY:
            expiry = self.default_expiry
        elif expiry == 0:
            # avoid time.time() related precision issues
            expiry = -1
        return None if expiry is None else time.time() + expiry
153328
@Override
    public CompletableFuture<Void> setExpireSecondsAsync(String key, int expireSeconds) {
        return (CompletableFuture) send("EXPIRE", null, (Type) null, key, key.getBytes(UTF8), String.valueOf(expireSeconds).getBytes(UTF8));
    }
461684
public ExpiringSet<T> buildSet() {
		Set<T> target = (Set<T>) (handleExistEls ? Sets.<T>newHashSet() :
				(elements instanceof Set ? elements : Sets.newHashSet(elements)));
		
		ExpiringSet<T> expiringSet = new ExpirationSet<T>(target, ticker.or(systemTicker()),
				defaultExpireTime.orNull(), defaultExpireUnit.orNull());
		
		if (handleExistEls) {
			expiringSet.addAll(elements);
		}
		
		return expiringSet;
	}
361999
public void cache(String key, Object obj, int expiration) {
        H.Session session = this.session;
        if (null != session) {
            session.cache(key, obj, expiration);
        } else {
            app().cache().put(key, obj, expiration);
        }
    }
432046
public StoredChannel setExpiration(Long expiration) {
    lock.lock();
    try {
      this.expiration = expiration;
    } finally {
      lock.unlock();
    }
    return this;
  }
970281
public CmsResourceFilter addRequireExpireBefore(long time) {

        CmsResourceFilter extendedFilter = (CmsResourceFilter)clone();

        extendedFilter.m_filterExpire = true;
        extendedFilter.m_expireBefore = time;
        extendedFilter.updateCacheId();

        return extendedFilter;
    }
245329
public function setExpiry(int $expiry = 604800) : CNabuDataObject
    {
        if ($expiry === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$expiry")
            );
        }
        $this->setValue('nb_domain_zone_expiry', $expiry);
        
        return $this;
    }
491349
public long stopStartTimer(long _expiryTime, Entry<K,V> e) {
    if ((_expiryTime > 0 && _expiryTime < Long.MAX_VALUE) || _expiryTime < 0) {
      throw new IllegalArgumentException("invalid expiry time, cache is not initialized with expiry: " + Util.formatMillis(_expiryTime));
    }
    return _expiryTime == 0 ? Entry.EXPIRED : _expiryTime;
  }
427664
public ExecutorFactoryConfigurationBuilder addExecutorProperty(String key, String value) {
      TypedProperties properties = attributes.attribute(PROPERTIES).get();
      properties.put(key, value);
      attributes.attribute(PROPERTIES).set(properties);
      return this;
   }
701628
public JwkProviderBuilder cached(long cacheSize, long expiresIn, TimeUnit unit) {
        this.cached = true;
        this.cacheSize = cacheSize;
        this.expiresIn = expiresIn;
        this.expiresUnit = unit;
        return this;
    }
11314
public void createExpirationMetaData(DCache cache) {
        //final String methodName = "createExpirationMetaData()";
        ExpirationMetaData expirationMetaData = (ExpirationMetaData)cacheInstancesTable.get(cache);
        if (expirationMetaData == null) {
            int initialTableSize = DEFAULT_SIZE_FOR_MEM;
            if (cache.getSwapToDisk() && cache.getCacheConfig().getDiskCachePerformanceLevel() == CacheConfig.HIGH) {
                initialTableSize = DEFAULT_SIZE_FOR_MEM_DISK;
            }
            expirationMetaData = new ExpirationMetaData(initialTableSize);
            cacheInstancesTable.put(cache, expirationMetaData);
        }
    }