public void enableSessionValidation() {
        if (this.sessionValidationInterval > 0L) {
            this.service = Executors.newSingleThreadScheduledExecutor(new ThreadFactory() {
                private final AtomicInteger count = new AtomicInteger(1);

                public Thread newThread(Runnable r) {
                    Thread thread = new Thread(r);
                    thread.setDaemon(true);
                    thread.setName(threadNamePrefix + count.getAndIncrement());
                    return thread;
                }
            });
            this.service.scheduleAtFixedRate(this, sessionValidationInterval,
                    sessionValidationInterval, TimeUnit.MILLISECONDS);
        }
        this.enabled = true;
    }
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