public class ClonedLibrarySessionManager.ClonedSessionExecutor extends Executor
| Constructor and Description |
|---|
ClonedSessionExecutor(LibrarySession mainSess,
int maxPoolSize)
Constructs a ClonedSessionExecutor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
acceptNewSession(LibrarySession sess)
Puts the session back to the pool
|
protected void |
addPendingReserveSessionTask(ClonedLibrarySessionManager.ReserveSessionTask task)
Reserve a session from the pool.
|
protected void |
handleShutdown()
Handle a shutdown.
|
protected void |
increasePool(int count)
Increased the session pool by the specified count.
|
protected LibrarySession |
reserveSession()
Reserve a session from the pool.
|
protected void |
unreserveSession(LibrarySession sess)
Unreserve a session - release it back to the pool.
|
callTask, getQueueSize, interruptExecutingThread, isRequestQueueEmpty, logCallTaskException, run, shutdown, startThread, submitpublic ClonedSessionExecutor(LibrarySession mainSess, int maxPoolSize)
mainSess - the main LibrarySessionmaxPoolSize - the maximum pool sizeprotected LibrarySession reserveSession()
protected void addPendingReserveSessionTask(ClonedLibrarySessionManager.ReserveSessionTask task)
task - the reservation taskprotected void unreserveSession(LibrarySession sess)
sess - the session to releaseprotected void increasePool(int count)
count - the number of sessions to addprotected void acceptNewSession(LibrarySession sess)
sess - the sessionprotected void handleShutdown()
throws Exception
ExecutorhandleShutdown in class ExecutorException - if the operation failsCopyright © 2025. All rights reserved.