public class ClonedLibrarySessionManager extends Object
Modifier and Type | Class and Description |
---|---|
class |
ClonedLibrarySessionManager.ClonedSessionExecutor
An Executor that handles the management of cloned sessions.
|
class |
ClonedLibrarySessionManager.IncreasePoolTask
IncreasePoolTask results in creating new unallocated sessions
in the session pool.
|
class |
ClonedLibrarySessionManager.RequestSessionCreationTask
RequestSessionCreationTask creates a new cloned session,
and posts a SessionCreationAcknowledgementTask back to the main
thread.
|
class |
ClonedLibrarySessionManager.RequestShutdownTask
RequestShutdownTask requests the executor to shut down.
|
class |
ClonedLibrarySessionManager.ReserveSessionTask
ReserveSessionTask reserves a cloned session
in the executor's thread.
|
class |
ClonedLibrarySessionManager.SessionCreationAcknowledgementTask
SessionCreationAcknowledgementTask results in creating new unallocated sessions
in the session pool.
|
class |
ClonedLibrarySessionManager.SessionCreatorExecutor
An Executor that handles the creation of new cloned sessions.
|
class |
ClonedLibrarySessionManager.UnreserveSessionTask
UnreserveSessionTask unreserves a cloned session
in the executor's thread.
|
Constructor and Description |
---|
ClonedLibrarySessionManager(LibrarySession session)
Construct a ClonedLibrarySessionManager.
|
Modifier and Type | Method and Description |
---|---|
void |
createClonedSession()
Creates a cloned session without reserving it, which will increase the
number of pooled cloned sessions.
|
LibrarySession |
getMasterSession()
Returns the master session used to clone other sessions.
|
void |
requestShutdown()
Request a shutdown of this ClonedLibrarySessionManager.
|
LibrarySession |
reserveClonedSession()
Reserves a cloned session.
|
LibrarySession |
reserveClonedSession(long retryDelay)
Reserves a cloned session.
|
void |
unreserveClonedSession(LibrarySession sess)
Unreserves a cloned session.
|
public ClonedLibrarySessionManager(LibrarySession session) throws IfsException
session
- the master LibrarySessionIfsException
- if operation fails.public LibrarySession getMasterSession()
public LibrarySession reserveClonedSession() throws IfsException
IfsException
- if the operation failspublic LibrarySession reserveClonedSession(long retryDelay) throws IfsException
retryDelay
- the delay before retrying in case we have hit max
pool sizeIfsException
- if the operation failspublic void unreserveClonedSession(LibrarySession sess)
sess
- the previously reserved cloned session to unreservepublic void createClonedSession() throws IfsException
IfsException
- if the operation failspublic void requestShutdown() throws IfsException
IfsException
- if an error occurs,
or if the Manager has already terminatedCopyright © 2023. All rights reserved.