public void run() {
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Executing session validation...");
        }
        Thread.currentThread().setUncaughtExceptionHandler((t, e) -> {
            LOGGER.error("Error while validating the session, the thread will be stopped and session validation disabled", e);
            this.disableSessionValidation();
        });
        long startTime = System.currentTimeMillis();
        try {
            this.sessionManager.validateSessions();
        } catch (RuntimeException e) {
            LOGGER.error("Error while validating the session", e);
            //we don't stop the thread
        }
        long stopTime = System.currentTimeMillis();
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Session validation completed successfully in " + (stopTime - startTime) + " milliseconds.");
        }
    }
Creates a single thread {@link ScheduledExecutorService} to validate sessions at fixed intervals
and enables this scheduler. The executor is created as a daemon thread to allow JVM to shut down
core/src/main/java/org/apache/shiro/session/mgt/ExecutorServiceSessionValidationScheduler.java