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(); } } }
public synchronized void deIdle() if (isIdled())
public synchronized void deIdle() if (isIdled())
public synchronized void deIdle() if (isIdled())
public synchronized void deIdle() if (isIdled())
public synchronized void deIdle() if (isIdled())
if (!isIdled() && !_saveFailed)
public synchronized void deIdle() if (isIdled() && !_deIdleFailed)
public synchronized void deIdle() if (isIdled() && !_deIdleFailed)
if (!isIdled() && !_saveFailed)
if (!isIdled() && !_saveFailed)
if (!isIdled() && !_saveFailed)
if (!isIdled() && !_saveFailed)
synchronized void save(boolean reactivate) throws Exception { // Only idle the session if not already idled and no previous save/idle has failed if (!isIdled() && !_saveFailed) { if (LOG.isDebugEnabled()) LOG.debug("Saving {} {}",super.getId(),reactivate); try { willPassivate(); save(); if (reactivate) didActivate(); else clearAttributes(); } catch (Exception e) { LOG.warn("Problem saving session " + super.getId(), e); _idled=false; // assume problem was before _values.clear(); } } }
synchronized void save(boolean reactivate) throws Exception { // Only idle the session if not already idled and no previous save/idle has failed if (!isIdled() && !_saveFailed) { if (LOG.isDebugEnabled()) LOG.debug("Saving {} {}",super.getId(),reactivate); try { willPassivate(); save(); if (reactivate) didActivate(); else clearAttributes(); } catch (Exception e) { LOG.warn("Problem saving session " + super.getId(), e); _idled=false; // assume problem was before _values.clear(); } } }
synchronized void save(boolean reactivate) throws Exception { // Only idle the session if not already idled and no previous save/idle has failed if (!isIdled() && !_saveFailed) { if (LOG.isDebugEnabled()) LOG.debug("Saving {} {}",super.getId(),reactivate); try { willPassivate(); save(); if (reactivate) didActivate(); else clearAttributes(); } catch (Exception e) { LOG.warn("Problem saving session " + super.getId(), e); _idled=false; // assume problem was before _values.clear(); } } }
synchronized void save(boolean reactivate) throws Exception { // Only idle the session if not already idled and no previous save/idle has failed if (!isIdled() && !_saveFailed) { if (LOG.isDebugEnabled()) LOG.debug("Saving {} {}",super.getId(),reactivate); try { willPassivate(); save(); if (reactivate) didActivate(); else clearAttributes(); } catch (Exception e) { LOG.warn("Problem saving session " + super.getId(), e); _idled=false; // assume problem was before _values.clear(); } } }