/** * Creates a new SyncedFileAttributes using the specifies 'time to live' value. * * @param ttl the attributes' 'time to live', in milliseconds * @param updateAttributesNow if <code>true</code>, attributes are automatically updated */ public SyncedFileAttributes(long ttl, boolean updateAttributesNow) { setTtl(ttl); // also sets the expiration date if(updateAttributesNow) checkForExpiration(true); // force attributes update }
/** * Overridden to trigger attributes update if the expiration date has been reached. */ @Override public long getSize() { checkForExpiration(false); return super.getSize(); }
/** * Overridden to trigger attributes update if the expiration date has been reached. */ @Override public String getOwner() { checkForExpiration(false); return super.getOwner(); }
/** * Overridden to trigger attributes update if the expiration date has been reached. */ @Override public boolean exists() { checkForExpiration(false); return super.exists(); }
/** * Overridden to trigger attributes update if the expiration date has been reached. */ @Override public long getDate() { checkForExpiration(false); return super.getDate(); }
/** * Overridden to trigger attributes update if the expiration date has been reached. */ @Override public String getPath() { checkForExpiration(false); return super.getPath(); }
/** * Overridden to trigger attributes update if the expiration date has been reached. */ @Override public boolean isDirectory() { checkForExpiration(false); return super.isDirectory(); }
/** * Overridden to trigger attributes update if the expiration date has been reached. */ @Override public FilePermissions getPermissions() { checkForExpiration(false); return super.getPermissions(); }
/** * Overridden to trigger attributes update if the expiration date has been reached. */ @Override public String getGroup() { checkForExpiration(false); return super.getGroup(); }