Interface SessionManager
- All Known Implementing Classes:
SessionManagerImpl
public interface SessionManager
Mange the lifecycle of the
Session.-
Method Summary
Modifier and TypeMethodDescriptionvoidcloseSession(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle) Close the session with the specified identifier and releases the resources used by the session.static SessionManagercreate(DefaultContext defaultContext) Create theSessionManagerwith the default configuration.getSession(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle) Get theSessionwith the identifier.openSession(org.apache.flink.table.gateway.api.session.SessionEnvironment environment) Register a newSession.voidstart()Start theSessionManagerand do the required initialization.voidstop()Destroy theSessionManagerand releases used resources.
-
Method Details
-
create
Create theSessionManagerwith the default configuration. -
start
void start()Start theSessionManagerand do the required initialization. -
stop
void stop()Destroy theSessionManagerand releases used resources. -
getSession
Session getSession(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException Get theSessionwith the identifier.- Parameters:
sessionHandle- identifier of the session.- Returns:
- registered session.
- Throws:
org.apache.flink.table.gateway.api.utils.SqlGatewayException
-
openSession
Session openSession(org.apache.flink.table.gateway.api.session.SessionEnvironment environment) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException Register a newSession.- Parameters:
environment- the initialization environment.- Returns:
- created session.
- Throws:
org.apache.flink.table.gateway.api.utils.SqlGatewayException
-
closeSession
void closeSession(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException Close the session with the specified identifier and releases the resources used by the session.- Parameters:
sessionHandle- the identifier of the session.- Throws:
org.apache.flink.table.gateway.api.utils.SqlGatewayException
-