*/
public long renew(final Uuid cookie, final long extension) throws LeaseDeniedException, UnknownLeaseException {
LeasedResource resource = getLeasedResource(cookie);
long granted;
if (resource == null)
throw new UnknownLeaseException("No lease for cookie: " + cookie);
long now = System.currentTimeMillis();
if (resource.getExpiration() <= now) {
UnknownLeaseException e = new UnknownLeaseException("Lease has already expired");
if(logger.isTraceEnabled()) {
logger.trace("Lease has already expired by [{}] milliseconds, [{}] seconds",
(now-resource.getExpiration()), ((now-resource.getExpiration())/1000));
}
throw e;