@Override protected void invalidateSessions() throws Exception { // Invalidate all sessions to cause unbind events ArrayList<HashedSession> sessions=new ArrayList<HashedSession>(_sessions.values()); int loop=100; while (sessions.size()>0 && loop-->0) { // If we are called from doStop if (isStopping() && _storeDir != null && _storeDir.exists() && _storeDir.canWrite()) { // Then we only save and remove the session - it is not invalidated. for (HashedSession session : sessions) { session.save(false); removeSession(session,false); } } else { for (HashedSession session : sessions) session.invalidate(); } // check that no new sessions were created while we were iterating sessions=new ArrayList<HashedSession>(_sessions.values()); } }
@Override protected void invalidateSessions() throws Exception { // Invalidate all sessions to cause unbind events ArrayList<HashedSession> sessions=new ArrayList<HashedSession>(_sessions.values()); int loop=100; while (sessions.size()>0 && loop-->0) { // If we are called from doStop if (isStopping() && _storeDir != null && _storeDir.exists() && _storeDir.canWrite()) { // Then we only save and remove the session - it is not invalidated. for (HashedSession session : sessions) { session.save(false); removeSession(session,false); } } else { for (HashedSession session : sessions) session.invalidate(); } // check that no new sessions were created while we were iterating sessions=new ArrayList<HashedSession>(_sessions.values()); } }
@Override protected void shutdownSessions() throws Exception { // Invalidate all sessions to cause unbind events ArrayList<HashedSession> sessions=new ArrayList<HashedSession>(_sessions.values()); int loop=100; while (sessions.size()>0 && loop-->0) { // If we are called from doStop if (isStopping() && _storeDir != null && _storeDir.exists() && _storeDir.canWrite()) { // Then we only save and remove the session from memory- it is not invalidated. for (HashedSession session : sessions) { session.save(false); _sessions.remove(session.getClusterId()); } } else { for (HashedSession session : sessions) session.invalidate(); } // check that no new sessions were created while we were iterating sessions=new ArrayList<HashedSession>(_sessions.values()); } }
@Override protected void shutdownSessions() throws Exception { // Invalidate all sessions to cause unbind events ArrayList<HashedSession> sessions=new ArrayList<HashedSession>(_sessions.values()); int loop=100; while (sessions.size()>0 && loop-->0) { // If we are called from doStop if (isStopping() && _storeDir != null && _storeDir.exists() && _storeDir.canWrite()) { // Then we only save and remove the session from memory- it is not invalidated. for (HashedSession session : sessions) { session.save(false); _sessions.remove(session.getClusterId()); } } else { for (HashedSession session : sessions) session.invalidate(); } // check that no new sessions were created while we were iterating sessions=new ArrayList<HashedSession>(_sessions.values()); } }
@Override protected void invalidateSessions() throws Exception { // Invalidate all sessions to cause unbind events ArrayList<HashedSession> sessions=new ArrayList<HashedSession>(_sessions.values()); int loop=100; while (sessions.size()>0 && loop-->0) { // If we are called from doStop if (isStopping() && _storeDir != null && _storeDir.exists() && _storeDir.canWrite()) { // Then we only save and remove the session - it is not invalidated. for (HashedSession session : sessions) { session.save(false); removeSession(session,false); } } else { for (HashedSession session : sessions) session.invalidate(); } // check that no new sessions were created while we were iterating sessions=new ArrayList<HashedSession>(_sessions.values()); } }
@Override protected void invalidateSessions() throws Exception { // Invalidate all sessions to cause unbind events ArrayList<HashedSession> sessions=new ArrayList<HashedSession>(_sessions.values()); int loop=100; while (sessions.size()>0 && loop-->0) { // If we are called from doStop if (isStopping() && _storeDir != null && _storeDir.exists() && _storeDir.canWrite()) { // Then we only save and remove the session - it is not invalidated. for (HashedSession session : sessions) { session.save(false); removeSession(session,false); } } else { for (HashedSession session : sessions) session.invalidate(); } // check that no new sessions were created while we were iterating sessions=new ArrayList<HashedSession>(_sessions.values()); } }
@Override protected void invalidateSessions() throws Exception { // Invalidate all sessions to cause unbind events ArrayList<HashedSession> sessions=new ArrayList<HashedSession>(_sessions.values()); int loop=100; while (sessions.size()>0 && loop-->0) { // If we are called from doStop if (isStopping() && _storeDir != null && _storeDir.exists() && _storeDir.canWrite()) { // Then we only save and remove the session - it is not invalidated. for (HashedSession session : sessions) { session.save(false); removeSession(session,false); } } else { for (HashedSession session : sessions) session.invalidate(); } // check that no new sessions were created while we were iterating sessions=new ArrayList<HashedSession>(_sessions.values()); } }
@Override protected void invalidateSessions() throws Exception { // Invalidate all sessions to cause unbind events ArrayList<HashedSession> sessions=new ArrayList<HashedSession>(_sessions.values()); int loop=100; while (sessions.size()>0 && loop-->0) { // If we are called from doStop if (isStopping() && _storeDir != null && _storeDir.exists() && _storeDir.canWrite()) { // Then we only save and remove the session - it is not invalidated. for (HashedSession session : sessions) { session.save(false); removeSession(session,false); } } else { for (HashedSession session : sessions) session.invalidate(); } // check that no new sessions were created while we were iterating sessions=new ArrayList<HashedSession>(_sessions.values()); } }
@Override protected void invalidateSessions() throws Exception { // Invalidate all sessions to cause unbind events ArrayList<HashedSession> sessions=new ArrayList<HashedSession>(_sessions.values()); int loop=100; while (sessions.size()>0 && loop-->0) { // If we are called from doStop if (isStopping() && _storeDir != null && _storeDir.exists() && _storeDir.canWrite()) { // Then we only save and remove the session - it is not invalidated. for (HashedSession session : sessions) { session.save(false); removeSession(session,false); } } else { for (HashedSession session : sessions) session.invalidate(); } // check that no new sessions were created while we were iterating sessions=new ArrayList<HashedSession>(_sessions.values()); } }
if (isStopping() || isStopped()) return;
if (isStopping() || isStopped()) return;
if (isStopping() || isStopped()) return;
if (isStopping() || isStopped()) return;
if (isStopping() || isStopped()) return;
if (isStopping() || isStopped()) return;
if (isStopping() || isStopped()) return;
if (isStopping() || isStopped()) return;
if (isStopping() || isStopped()) return;