/** * Return the time to live for this object in seconds. * Rounds up eagerly, e.g. 9.00001 still to 10. * @return number of seconds until expiration * @throws TransactionTimedOutException if the deadline has already been reached */ public int getTimeToLiveInSeconds() { double diff = ((double) getTimeToLiveInMillis()) / 1000; int secs = (int) Math.ceil(diff); checkTransactionTimeout(secs <= 0); return secs; }
/** * Return the time to live for this object in seconds. * Rounds up eagerly, e.g. 9.00001 still to 10. * @return number of seconds until expiration * @throws TransactionTimedOutException if the deadline has already been reached */ public int getTimeToLiveInSeconds() { double diff = ((double) getTimeToLiveInMillis()) / 1000; int secs = (int) Math.ceil(diff); checkTransactionTimeout(secs <= 0); return secs; }
/** * Return the time to live for this object in seconds. * Rounds up eagerly, e.g. 9.00001 still to 10. * @return number of seconds until expiration * @throws TransactionTimedOutException if the deadline has already been reached */ public int getTimeToLiveInSeconds() { double diff = ((double) getTimeToLiveInMillis()) / 1000; int secs = (int) Math.ceil(diff); checkTransactionTimeout(secs <= 0); return secs; }
/** * Return the time to live for this object in seconds. * Rounds up eagerly, e.g. 9.00001 still to 10. * @return number of seconds until expiration * @throws TransactionTimedOutException if the deadline has already been reached */ public int getTimeToLiveInSeconds() { double diff = ((double) getTimeToLiveInMillis()) / 1000; int secs = (int) Math.ceil(diff); checkTransactionTimeout(secs <= 0); return secs; }
/** * Return the time to live for this object in seconds. * Rounds up eagerly, e.g. 9.00001 still to 10. * @return number of seconds until expiration * @throws TransactionTimedOutException if the deadline has already been reached */ public int getTimeToLiveInSeconds() { double diff = ((double) getTimeToLiveInMillis()) / 1000; int secs = (int) Math.ceil(diff); checkTransactionTimeout(secs <= 0); return secs; }