Convert expiry value to the entry field value, essentially maps 0 to {@link Entry#EXPIRED}
since 0 is a virgin entry. Restart the timer if needed.

@param _expiryTime calculated expiry time
@return sanitized nextRefreshTime for storage in the entry.
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;
  }
1222521
@Override
    public long getExpiryStartTime()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getExpiryStartTime");

        // Set the expiry to start from the last time we updated the wait time.
        long startTime = getCurrentMEArrivalTimestamp();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getExpiryStartTime", Long.valueOf(startTime));

        return startTime;
    }
1079394
@Override
    public byte[] set(byte[] key, byte[] value, int expireTime) {
        if (key == null) {
            return null;
        }
        Jedis jedis = getJedis();
        try {
            jedis.set(key, value);
            // -1 and 0 is not a valid expire time in Jedis
            if (expireTime > 0) {
                jedis.expire(key, expireTime);
            }
         } finally {
            jedis.close();
        }
        return value;
    }
198540
public long expire(long time) {
    for (int logSize = (Long.SIZE - 1) - numberOfLeadingZeros(last); logSize >= 0; logSize--) {
      boolean live = false;
      for (int i = min_l(logSize); i < max_l(logSize); i++) {
        long end = boxes[i];
        if (end != MIN_VALUE) {
          if ((time - end) >= window) {
            total -= 1L << logSize;
            boxes[i] = MIN_VALUE;
          } else {
            live = true;
          }
        }
      }
      if (live) {
        last = 1L << logSize;
        return count();
      }
    }
    last = 0;
    return 0;
  }
1072484
def get_expiration(self):
        
        exp = self._get_int('expiration')
        if exp is not None:
            return datetime.datetime.fromtimestamp(
                exp
            )
        return None
749217
protected final long getWriteExpireTimeMS(boolean created) {
    try {
      Duration duration = created ? expiry.getExpiryForCreation() : expiry.getExpiryForUpdate();
      if (duration == null) {
        return Long.MIN_VALUE;
      } else if (duration.isZero()) {
        return 0L;
      } else if (duration.isEternal()) {
        return Long.MAX_VALUE;
      }
      return duration.getAdjustedTime(currentTimeMillis());
    } catch (Exception e) {
      logger.log(Level.WARNING, "Failed to get the policy's expiration time", e);
      return Long.MIN_VALUE;
    }
  }
53392
private long generateExpirationDate(Date expirationDate) {

        long expirationInSeconds = expirationDate != null ? ((expirationDate
                .getTime() - clock.currentTimeMillis()) / 1000L)
                : PRESIGN_URL_MAX_EXPIRATION_SECONDS;

        if (expirationInSeconds > PRESIGN_URL_MAX_EXPIRATION_SECONDS) {
            throw new SdkClientException(
                    "Requests that are pre-signed by SigV4 algorithm are valid for at most 7 days. "
                            + "The expiration date set on the current request ["
                            + AWS4SignerUtils.formatTimestamp(expirationDate
                                    .getTime()) + "] has exceeded this limit.");
        }
        return expirationInSeconds;
    }
1207221
public static <T> ExpiringReference<T> create (T value, long expireMillis)
    {
        return new ExpiringReference<T>(value, expireMillis);
    }
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
508275
private long calculateExpiryTime(K key, PutOperation<K, V> existing, Operation<K, V> operation, Result<K, V> newValue) {
    if (operation.isExpiryAvailable()) {
      return operation.expirationTime();
    } else {
      try {
        Duration duration;
        if (existing == null) {
          duration = requireNonNull(expiry.getExpiryForCreation(key, newValue.getValue()));
        } else {
          duration = expiry.getExpiryForUpdate(key, existing::getValue, newValue.getValue());
          if (duration == null) {
            return existing.expirationTime();
          }
        }
        if (duration.isNegative()) {
          duration = Duration.ZERO;
        } else if (isExpiryDurationInfinite(duration)) {
          return Long.MAX_VALUE;
        }
        return ExpiryUtils.getExpirationMillis(operation.timeStamp(), duration);
      } catch (Exception ex) {
        LOG.error("Expiry computation caused an exception - Expiry duration will be 0 ", ex);
        return Long.MIN_VALUE;
      }
    }
  }
786889
public long getExpirationTime() {
		if(!isValid()) {
			throw new IllegalStateException("this sip application session is not valid anymore");
		}
		if(expirationTimerTask == null) {
			return 0;
		}
		long delay = expirationTimerTask.getDelay();
		if(delay <= 0) {
			return 0;
		}
		if(expired) {
			return Long.MIN_VALUE;
		}
		return this.expirationTime;
	}
60499
public function getExpire()
    {
        if ($this->expire instanceof DateTimeInterface) {
            return $this->expire;
        }

        return $this->expire ? $this->expire - time() : null;
    }
503988
private DateTime credentialExpirationTime(JsonNode credentialsJson) {
        String expiration = getText(credentialsJson, "Expiration");

        if (expiration != null) {
            DateTime credentialExpiration = new DateTime(DateUtils.parseISO8601Date(expiration));
            credentialExpiration = credentialExpiration.minus(expirationBufferUnit.toMillis(expirationBufferValue));
            return credentialExpiration;
        } else {
            return DateTime.now().plusYears(9999);
        }
    }
535757
int getMemcachedExpirationTime() {
        if ( !_sticky ) {
            throw new IllegalStateException( "The memcached expiration time cannot be determined in non-sticky mode." );
        }
        if ( _lastMemcachedExpirationTime == 0 ) {
            return 0;
        }

        final long timeIdleInMillis = _lastBackupTime == 0 ? 0 : System.currentTimeMillis() - _lastBackupTime;
        /* rounding is just for tests, as they are using actually seconds for testing.
         * with a default setup 1 second difference wouldn't matter...
         */
        final int timeIdle = Math.round( (float)timeIdleInMillis / 1000L );
        final int expirationTime = _lastMemcachedExpirationTime - timeIdle;
        /* prevent negative expiration times.
         * because 0 means no expiration at all, we use 1 as min value here
         */
        return max(1, expirationTime);
    }
997473
def expiry_date(self, value):
        
        if value:
            self._expiry_date = parse(value).date() if isinstance(value, type_check) else value
1306730
def expiration_time(self):
        
        logging_forgotten_time = configuration.behavior.login_forgotten_seconds

        if logging_forgotten_time <= 0:
            return None

        now = timezone.now()
        delta = now - self.modified
        time_remaining = logging_forgotten_time - delta.seconds

        return time_remaining
26408
function getExpiryDate(store, data) {
        
        var offset;

        if (data.cookie.originalMaxAge) {
            offset = data.cookie.originalMaxAge;
        } else {
            offset = store.sessionTimeOut * 60000;
        }
        
        return offset ? new Date(Date.now() + offset) : null;
    }