public class SingleSessionManager extends Object implements SessionManager
SessionManager
only has one session at most. It uses the less resources and also
provides special handler for the REMOVE JAR syntax.
The special SessionManager
is used in the Sql Client embedded mode and doesn't support
concurrently modification.
Constructor and Description |
---|
SingleSessionManager(DefaultContext defaultContext) |
Modifier and Type | Method and Description |
---|---|
void |
closeSession(SessionHandle sessionHandle)
Close the session with the specified identifier and releases the resources used by the
session.
|
Session |
getSession(SessionHandle sessionHandle)
Get the
Session with the identifier. |
Session |
openSession(SessionEnvironment environment)
Register a new
Session . |
void |
start()
Start the
SessionManager and do the required initialization. |
void |
stop()
Destroy the
SessionManager and releases used resources. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
public SingleSessionManager(DefaultContext defaultContext)
public void start()
SessionManager
SessionManager
and do the required initialization.start
in interface SessionManager
public void stop()
SessionManager
SessionManager
and releases used resources.stop
in interface SessionManager
public Session getSession(SessionHandle sessionHandle) throws SqlGatewayException
SessionManager
Session
with the identifier.getSession
in interface SessionManager
sessionHandle
- identifier of the session.SqlGatewayException
public Session openSession(SessionEnvironment environment) throws SqlGatewayException
SessionManager
Session
.openSession
in interface SessionManager
environment
- the initialization environment.SqlGatewayException
public void closeSession(SessionHandle sessionHandle) throws SqlGatewayException
SessionManager
closeSession
in interface SessionManager
sessionHandle
- the identifier of the session.SqlGatewayException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.