public void registerSessionActivity(final String _sessionID,
                                        final Date _date)
    {
        ConcurrentMap<String, Long> lastactive = Session.get().getApplication()
                        .getMetaData(ConnectionRegistry.LASTACTIVE);

        if (lastactive == null) {
            synchronized (ConnectionRegistry.LASTACTIVE) {
                lastactive = Session.get().getApplication().getMetaData(ConnectionRegistry.LASTACTIVE);
                if (lastactive == null) {
                    lastactive = Generics.<String, Long>newConcurrentHashMap();
                    Session.get().getApplication().setMetaData(ConnectionRegistry.LASTACTIVE, lastactive);
                }
            }
        }
        lastactive.put(_sessionID, _date.getTime());
        ConnectionRegistry.LOG.debug("Register Activity for Session: {}", _sessionID);
    }
public void registerSessionActivity ( final String _sessionID , final Date _date ) { ConcurrentMap < String , Long > lastactive = Session . get ( ) . getApplication ( ) . getMetaData ( ConnectionRegistry . LASTACTIVE ) ; if ( lastactive == null ) { synchronized ( ConnectionRegistry . LASTACTIVE ) { lastactive = Session . get ( ) . getApplication ( ) . getMetaData ( ConnectionRegistry . LASTACTIVE ) ; if ( lastactive == null ) { lastactive = Generics . < String , Long > newConcurrentHashMap ( ) ; Session . get ( ) . getApplication ( ) . setMetaData ( ConnectionRegistry . LASTACTIVE , lastactive ) ; } } } lastactive . put ( _sessionID , _date . getTime ( ) ) ; ConnectionRegistry . LOG . debug ( "Register Activity for Session: {}" , _sessionID ) ; }
@param _sessionID sessionId the Activit will be registered for
@param _date date of the activity