Calculate the expiration time with the given operator time and relative window size.

@param operatorTime the operator time
@param relativeSize the relative window size
@return the expiration time for cached rows
509236
private long calExpirationTime(long operatorTime, long relativeSize) {
		if (operatorTime < Long.MAX_VALUE) {
			return operatorTime - relativeSize - allowedLateness - 1;
		} else {
			// When operatorTime = Long.MaxValue, it means the stream has reached the end.
			return Long.MAX_VALUE;
		}
	}
709424
public void setExpiryTime(long pExpiryTime) {
        long oldEexpiryTime = expiryTime;

        expiryTime = pExpiryTime;

        if (expiryTime < oldEexpiryTime) {
            // Expire now
            nextExpiryTime = 0;
            removeExpiredEntries();
        }
    }
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;
  }
360840
public int updateExpirationTime(Object id, long oldExpirationTime, int size, long newExpirationTime, long newValidatorExpirationTime) {
        int returnCode = this.htod.updateExpirationTime(id, oldExpirationTime, size, newExpirationTime, newValidatorExpirationTime);
        if (returnCode == HTODDynacache.DISK_EXCEPTION) {
            stopOnError(this.htod.diskCacheException);
        }
        return returnCode;
    }
103138
def partition_expiration(self):
        
        warnings.warn(
            "This method will be deprecated in future versions. Please use "
            "Table.time_partitioning.expiration_ms instead.",
            PendingDeprecationWarning,
            stacklevel=2,
        )
        if self.time_partitioning is not None:
            return self.time_partitioning.expiration_ms
985905
protected Result readExpiredByRange(ValueSet expiredIds, int index, int length) {
        final String methodName = "readExpiredByRange()";
        Result result = getFromResultPool();
        HashtableOnDisk cache_instance = null;
        this.scanExpiredTime = 0;
        try {
            rwLock.readLock().lock();
            cache_instance = object_cache;
            if (cache_instance == null) {
                result.bComplete = true;
                return result;
            }
            if (index == 0) {
                cache_instance.rangeExpiredIndex = 0;
            }
            long t = System.nanoTime();
            DynaAction da = new DynaAction(expiredIds, this);
            int rangeIndex = cache_instance.iterateKeys(da, cache_instance.rangeExpiredIndex, length);
            this.scanExpiredTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - t);

            if ((expiredIds.size() + da.notExpiredCount) < length) {
                cache_instance.rangeExpiredIndex = 0;
                result.bComplete = true;
            } else {
                cache_instance.rangeExpiredIndex = rangeIndex;
            }
        } catch (FileManagerException ex) {
            this.diskCacheException = ex;
            result.diskException = ex;
            result.returnCode = DISK_EXCEPTION;
        } catch (HashtableOnDiskException ex) {
            this.diskCacheException = ex;
            result.diskException = ex;
            result.returnCode = DISK_EXCEPTION;
        } catch (IOException ex) {
            this.diskCacheException = ex;
            result.diskException = ex;
            result.returnCode = DISK_EXCEPTION;
        } catch (Exception ex) {
            result.returnCode = OTHER_EXCEPTION;
            result.diskException = ex;
        } finally {
            rwLock.readLock().unlock();
            if (result.returnCode != NO_EXCEPTION) {
                if (tc.isDebugEnabled())
                    Tr.debug(tc, methodName, "cacheName=" + this.cacheName + "\n Exception: " + ExceptionUtility.getStackTrace(result.diskException));
            }
            if (result.returnCode == DISK_EXCEPTION || result.returnCode == OTHER_EXCEPTION) {
                com.ibm.ws.ffdc.FFDCFilter.processException(result.diskException, "com.ibm.ws.cache.HTODDynacache.readExpiredByRange", "1640", this);
            }
        }

        return result;
    }
1216910
public static ExpiryPolicy<Object, Object> timeToLiveExpiration(Duration timeToLive) {
    Objects.requireNonNull(timeToLive, "TTL duration cannot be null");
    if (timeToLive.isNegative()) {
      throw new IllegalArgumentException("TTL duration cannot be negative");
    }
    return new TimeToLiveExpiryPolicy(timeToLive);
  }
571416
protected function getExpiry($expiry, $relativeTimestamp)
    {
        if (!is_int($expiry)) {
            $expiry = strtotime($expiry, $relativeTimestamp);
        }

        return $expiry;
    }
723230
public static base_response expire(nitro_service client, cacheobject resource) throws Exception {
		cacheobject expireresource = new cacheobject();
		expireresource.locator = resource.locator;
		expireresource.url = resource.url;
		expireresource.host = resource.host;
		expireresource.port = resource.port;
		expireresource.groupname = resource.groupname;
		expireresource.httpmethod = resource.httpmethod;
		return expireresource.perform_operation(client,"expire");
	}
607822
public void expire(long time) {
    long calculatedSize = 0;
    Iterator<Bar> it = bars.iterator();
    while (it.hasNext()) {
      long barSize = it.next().expire(time);
      if (barSize == 0) {
        it.remove();
      }
      calculatedSize += barSize;
    }
    this.size = calculatedSize;
    if (bars.isEmpty()) {
      bars.add(new Bar(barEpsilon, window));
    }
  }
701628
public JwkProviderBuilder cached(long cacheSize, long expiresIn, TimeUnit unit) {
        this.cached = true;
        this.cacheSize = cacheSize;
        this.expiresIn = expiresIn;
        this.expiresUnit = unit;
        return this;
    }
33596
public static base_response expire(nitro_service client, cachecontentgroup resource) throws Exception {
		cachecontentgroup expireresource = new cachecontentgroup();
		expireresource.name = resource.name;
		return expireresource.perform_operation(client,"expire");
	}
1306613
protected Spliterator<InternalCacheEntry<K, V>> filterExpiredEntries(Spliterator<InternalCacheEntry<K, V>> spliterator) {
      // This way we only read the wall clock time at the beginning
      long accessTime = timeService.wallClockTime();
      return new FilterSpliterator<>(spliterator, expiredIterationPredicate(accessTime));
   }
426001
public boolean expired(int expiration) {
        if (null == cliContext) {
            return true;
        }
        if ((daemon || cliContext.inProgress()) && !cliContext.disconnected()) {
            return false;
        }
        long l = expiration * 1000;
        return l < ($.ms() - ts);
    }
35155
protected void setLastInstanceActiveTime(String instanceId, long time, T jedis){
        jedis.hset(redisSchema.lastInstanceActiveTime(), instanceId, Long.toString(time));
    }
531247
private final void setExpiration(long expirationInMinutes) {
	expirationInMilliseconds = System.currentTimeMillis()+ expirationInMinutes * 60 * 1000;
        signature = null;
        if (userData != null) {
            encryptedBytes = null;
            userData.addAttribute("expire", Long.toString(expirationInMilliseconds));
        } else {
            encryptedBytes = null;
        }
    }
1281336
def expireat(self, key, when):
        """"""
        expire_time = datetime.fromtimestamp(when)
        key = self._encode(key)
        if key in self.redis:
            self.timeouts[key] = expire_time
            return True
        return False