/** * @return the absolute time (ms since Jan 1, 1970) at which this * region expires, due to either time-to-live or idle-timeout (whichever * will occur first), or 0 if neither are used. */ public long getExpirationTime() throws EntryNotFoundException { long ttl = getTTLExpirationTime(); long idle = getIdleExpirationTime(); if (ttl == 0) { return idle; } else if (idle == 0) { return ttl; } return Math.min(ttl, idle); }
/** * @return the absolute time (ms since Jan 1, 1970) at which this * region expires, due to either time-to-live or idle-timeout (whichever * will occur first), or 0 if neither are used. */ long getExpirationTime() throws EntryNotFoundException { long ttl = getTTLExpirationTime(); long idle = getIdleExpirationTime(); if (ttl == 0) { return idle; } else if (idle == 0) { return ttl; } return Math.min(ttl, idle); }
expIdle = String.valueOf(getIdleExpirationTime());
expIdle = String.valueOf(getIdleExpirationTime());
/** 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(); }