public class SessionManagerImpl extends Object implements SessionManager
SessionManager
that manage the lifecycle of the Session
.Constructor and Description |
---|
SessionManagerImpl(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.
|
int |
currentSessionCount() |
int |
getOperationCount(SessionHandle sessionHandle) |
Session |
getSession(SessionHandle sessionHandle)
Get the
Session with the identifier. |
boolean |
isSessionAlive(SessionHandle sessionId) |
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 SessionManagerImpl(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
@VisibleForTesting public boolean isSessionAlive(SessionHandle sessionId)
@VisibleForTesting public int currentSessionCount()
@VisibleForTesting public int getOperationCount(SessionHandle sessionHandle)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.