/** Return the absolute time when TTL expiration occurs, or 0 if not used */ protected final long getTTLExpirationTime() throws EntryNotFoundException { long ttl = getTTLAttributes().getTimeout(); long tilt = 0; if (ttl > 0) { if (!getLocalRegion().EXPIRY_UNITS_MS) { ttl *= 1000; } tilt = getLastModifiedTime() + ttl; } return tilt; }
/** Return the absolute time when TTL expiration occurs, or 0 if not used */ public final long getTTLExpirationTime() throws EntryNotFoundException { long ttl = getTTLAttributes().getTimeout(); long tilt = 0; if (ttl > 0) { if (getLocalRegion()!=null && !getLocalRegion().EXPIRY_UNITS_MS) { ttl *= 1000; } tilt = getLastModifiedTime() + ttl; } return tilt; }
String expIdle = "<unavailable>"; try { if (getTTLAttributes() != null) { expTtl = String.valueOf(getTTLExpirationTime());
/** Why did this expire? * @return the action to perform or null if NONE */ protected ExpirationAction getAction() { long ttl = getTTLExpirationTime(); long idle = getIdleExpirationTime(); if (ttl == 0) { if (idle == 0) return null; return getIdleAttributes().getAction(); } if (idle == 0) { // we know ttl != 0 return getTTLAttributes().getAction(); } // Neither is 0 if (idle < ttl) { return getIdleAttributes().getAction(); } return getTTLAttributes().getAction(); }
/** Why did this expire? * @return the action to perform or null if NONE */ protected ExpirationAction getAction() { long ttl = getTTLExpirationTime(); long idle = getIdleExpirationTime(); if (ttl == 0) { if (idle == 0) return null; return getIdleAttributes().getAction(); } if (idle == 0) { // we know ttl != 0 return getTTLAttributes().getAction(); } // Neither is 0 if (idle < ttl) { return getIdleAttributes().getAction(); } return getTTLAttributes().getAction(); }
String expIdle = "<unavailable>"; try { if (getTTLAttributes() != null) { expTtl = String.valueOf(getTTLExpirationTime());