public synchronized void deIdle() { if (isIdled()) { // Access now to prevent race with idling period access(System.currentTimeMillis()); if (LOG.isDebugEnabled()) LOG.debug("De-idling " + super.getId()); FileInputStream fis = null; try { File file = new File(_hashSessionManager._storeDir, super.getId()); if (!file.exists() || !file.canRead()) throw new FileNotFoundException(file.getName()); fis = new FileInputStream(file); _idled = false; _hashSessionManager.restoreSession(fis, this); didActivate(); // If we are doing period saves, then there is no point deleting at this point if (_hashSessionManager._savePeriodMs == 0) file.delete(); } catch (Exception e) { LOG.warn("Problem de-idling session " + super.getId(), e); IO.close(fis); invalidate(); } } }
public synchronized void deIdle() { if (isIdled()) { // Access now to prevent race with idling period access(System.currentTimeMillis()); if (LOG.isDebugEnabled()) LOG.debug("De-idling " + super.getId()); FileInputStream fis = null; try { File file = new File(_hashSessionManager._storeDir, super.getId()); if (!file.exists() || !file.canRead()) throw new FileNotFoundException(file.getName()); fis = new FileInputStream(file); _idled = false; _hashSessionManager.restoreSession(fis, this); didActivate(); // If we are doing period saves, then there is no point deleting at this point if (_hashSessionManager._savePeriodMs == 0) file.delete(); } catch (Exception e) { LOG.warn("Problem de-idling session " + super.getId(), e); IO.close(fis); invalidate(); } } }
access(System.currentTimeMillis());
access(System.currentTimeMillis());
access(System.currentTimeMillis());
access(System.currentTimeMillis());
access(System.currentTimeMillis());
access(System.currentTimeMillis());
access(System.currentTimeMillis());