public void expireSession(PrimaryBackupSession session) {
    if (sessions.remove(session.sessionId().id()) != null) {
      session.expire();
      listeners.forEach(l -> l.onExpire(session));
    }
  }
public void expireSession ( PrimaryBackupSession session ) { if ( sessions . remove ( session . sessionId ( ) . id ( ) ) != null ) { session . expire ( ) ; listeners . forEach ( l -> l . onExpire ( session ) ) ; } }
Expires and removes a session from the sessions list.

@param session The session to remove.