synchronized (_sessions) {
_sessionIter = _sessions.values(_sessionIter);
while (_sessionIter.hasNext()) {
SessionArrayValue session = _sessionIter.next();
long maxIdleTime = session.getMaxInactiveInterval();
if (session.inUse())
liveSessions++;
else if (session.getAccessTime() + maxIdleTime < now)
_sessionList.add(session);
else
liveSessions++;
}
}
synchronized (_statisticsLock) {
_sessionTimeoutCount += _sessionList.size();
}
for (int i = 0; i < _sessionList.size(); i++) {
SessionArrayValue session = _sessionList.get(i);
try {
long maxIdleTime = session.getMaxInactiveInterval();
_sessions.remove(session.getId());
session.invalidate();
} catch (Throwable e) {
log.log(Level.FINER, e.toString(), e);
}
}
} finally {