private boolean checkForRefresh(Element elem, long accessTime, long timeToRefreshMillis) { if (elem == null) { return false; } long minAccessForRefreshTime = elem.getCreationTime() + timeToRefreshMillis; return (accessTime >= minAccessForRefreshTime); }
/** * Create a new write operation for a particular element and creation time * * @param element the element to write * @param creationTime the creation time of the operation */ public WriteOperation(Element element, long creationTime) { this.element = new Element( element.getObjectKey(), element.getObjectValue(), element.getVersion(), element.getCreationTime(), element.getLastAccessTime(), element.getHitCount(), false, element.getTimeToLive(), element.getTimeToIdle(), element.getLastUpdateTime()); this.creationTime = creationTime; }
public void oturumKaldir(String key) { Element elem = getCache().get(key); getCache().remove(key); oturumSayisiAzalt(elem.getCreationTime()); }