final long lastAttempt = sr.getExpiration() - Math.max(lockoutDuration, counterInterval); final long timeDifference = System.currentTimeMillis() - lastAttempt; if (timeDifference <= lockoutDuration) {
if (record != null) { Long exp = record.getExpiration(); if (exp == null || System.currentTimeMillis() < exp) { return false;
/** {@inheritDoc} */ @Override @Nullable public Object read(@Nonnull final Object value) throws IOException { final StorageRecord record = read(AnnotationSupport.getContext(value), AnnotationSupport.getKey(value)); if (record != null) { AnnotationSupport.setValue(value, record.getValue()); AnnotationSupport.setExpiration(value, record.getExpiration()); return value; } return null; }
lastAccess = sr.getExpiration() - Math.max(lockoutDuration, counterInterval);
return new Pair(); } else { Long exp = record.getExpiration(); if (exp != null && System.currentTimeMillis() >= exp) { log.debug("Read failed, key '{}' expired in context '{}'", key, context);
g.writeStringField("value", record.getValue()); g.writeNumberField("version", record.getVersion()); if (record.getExpiration() != null) { g.writeFieldName("expiration"); g.writeObject(new DateTime(record.getExpiration()));
return true; } else { log.debug("Replay of value '{}' detected in cache, expires at {}", s, entry.getExpiration()); return false;
} else if (!writeBackValue.equals(sessionList.getValue())) { storageService.updateWithVersion(sessionList.getVersion(), serviceId, serviceKey, writeBackValue, sessionList.getExpiration());
record.getVersion(), getId(), key, record.getValue().substring(pos + 1), record.getExpiration());
if (updated.length() > 0) { if (storageService.updateWithVersion(sessionList.getVersion(), serviceId, serviceKey, updated, sessionList.getExpiration()) == null) { log.debug("Secondary index record disappeared, nothing to do");
Math.max(sessionList.getExpiration(), spSession.getExpirationInstant() + sessionSlop)) == null) { log.debug("Secondary index record disappeared, retrying as insert");