Class SessionManagerImpl
- java.lang.Object
-
- org.apache.flink.table.gateway.service.session.SessionManagerImpl
-
- All Implemented Interfaces:
SessionManager
public class SessionManagerImpl extends Object implements SessionManager
The implementation of theSessionManager
that manage the lifecycle of theSession
.
-
-
Constructor Summary
Constructors Constructor Description SessionManagerImpl(DefaultContext defaultContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 theSession
with the identifier.boolean
isSessionAlive(SessionHandle sessionId)
Session
openSession(SessionEnvironment environment)
Register a newSession
.void
start()
Start theSessionManager
and do the required initialization.void
stop()
Destroy theSessionManager
and releases used resources.
-
-
-
Constructor Detail
-
SessionManagerImpl
public SessionManagerImpl(DefaultContext defaultContext)
-
-
Method Detail
-
start
public void start()
Description copied from interface:SessionManager
Start theSessionManager
and do the required initialization.- Specified by:
start
in interfaceSessionManager
-
stop
public void stop()
Description copied from interface:SessionManager
Destroy theSessionManager
and releases used resources.- Specified by:
stop
in interfaceSessionManager
-
getSession
public Session getSession(SessionHandle sessionHandle) throws SqlGatewayException
Description copied from interface:SessionManager
Get theSession
with the identifier.- Specified by:
getSession
in interfaceSessionManager
- Parameters:
sessionHandle
- identifier of the session.- Returns:
- registered session.
- Throws:
SqlGatewayException
-
openSession
public Session openSession(SessionEnvironment environment) throws SqlGatewayException
Description copied from interface:SessionManager
Register a newSession
.- Specified by:
openSession
in interfaceSessionManager
- Parameters:
environment
- the initialization environment.- Returns:
- created session.
- Throws:
SqlGatewayException
-
closeSession
public void closeSession(SessionHandle sessionHandle) throws SqlGatewayException
Description copied from interface:SessionManager
Close the session with the specified identifier and releases the resources used by the session.- Specified by:
closeSession
in interfaceSessionManager
- Parameters:
sessionHandle
- the identifier of the session.- Throws:
SqlGatewayException
-
isSessionAlive
@VisibleForTesting public boolean isSessionAlive(SessionHandle sessionId)
-
currentSessionCount
@VisibleForTesting public int currentSessionCount()
-
getOperationCount
@VisibleForTesting public int getOperationCount(SessionHandle sessionHandle)
-
-