@NotThreadSafe public final class SessionCleaner extends Object implements Runnable, Closeable
Constructor and Description |
---|
SessionCleaner(Sessions sessions,
SessionCleanable... sessionCleanable)
Creates a new instance of
SessionCleaner . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Stops the checking, once this method is called, the object should be discarded.
|
void |
run()
Main loop for the cleanup, continuously looks for zombie sessions.
|
public SessionCleaner(Sessions sessions, SessionCleanable... sessionCleanable)
SessionCleaner
.sessions
- the worker's sessions will be clean up by callback if which has been timeoutsessionCleanable
- who wants to cleanup the sessionpublic void run()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2023. All Rights Reserved.