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 the SessionManager that manage the lifecycle of the Session.
  • Constructor Details

    • SessionManagerImpl

      public SessionManagerImpl(DefaultContext defaultContext)
  • Method Details

    • start

      public void start()
      Description copied from interface: SessionManager
      Start the SessionManager and do the required initialization.
      Specified by:
      start in interface SessionManager
    • stop

      public void stop()
      Description copied from interface: SessionManager
      Destroy the SessionManager and releases used resources.
      Specified by:
      stop in interface SessionManager
    • getSession

      public Session getSession(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Description copied from interface: SessionManager
      Get the Session with the identifier.
      Specified by:
      getSession in interface SessionManager
      Parameters:
      sessionHandle - identifier of the session.
      Returns:
      registered session.
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • openSession

      public Session openSession(org.apache.flink.table.gateway.api.session.SessionEnvironment environment) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Description copied from interface: SessionManager
      Register a new Session.
      Specified by:
      openSession in interface SessionManager
      Parameters:
      environment - the initialization environment.
      Returns:
      created session.
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • closeSession

      public void closeSession(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle) throws org.apache.flink.table.gateway.api.utils.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 interface SessionManager
      Parameters:
      sessionHandle - the identifier of the session.
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • isSessionAlive

      @VisibleForTesting public boolean isSessionAlive(org.apache.flink.table.gateway.api.session.SessionHandle sessionId)
    • currentSessionCount

      @VisibleForTesting public int currentSessionCount()
    • getOperationCount

      @VisibleForTesting public int getOperationCount(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle)