public long getPreviousSessionEndTimestamp() {
        if (previousSession.getFirst() != null) {
            return previousSession.getEndTimestamp();
        } else {
            return -1;
        }
    }
This keeps the information of a session key. i.e. current session and the previous session
modules/siddhi-core/src/main/java/io/siddhi/core/util/SessionContainer.java