private synchronized void sessionStatusChanged(Status newStatus) {
        switch (newStatus) {
            case NEW:
            case UNKNOWN:
                break;
            case DELETE:
            case DEACTIVATE:
                sessionRepository.deactivateSession(sessionId);
                break;
            case PREPARE:
                sessionRepository.prepareRemoteSession(sessionId);
                break;
            case ACTIVATE:
                sessionRepository.activate(sessionId);
                break;
            default:
                throw new IllegalStateException("Unknown status " + newStatus);
        }
    }
Watches session state for a session (/config/v2/tenants/&lt;tenantName&gt;/sessions/&lt;n&gt;/sessionState in ZooKeeper)
The session must be in the session repo.

@author Vegard Havdal
@author hmusum
configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionStateWatcher.java