Interface InternalTaskanaEngine


  • public interface InternalTaskanaEngine
    FOR INTERNAL USE ONLY.

    Contains all actions which are necessary within taskana.

    • Method Detail

      • openConnection

        void openConnection()
        Opens the connection to the database. Has to be called at the begin of each Api call that accesses the database
      • returnConnection

        void returnConnection()
        Returns the database connection into the pool. In the case of nested calls, simply pops the latest session from the session stack. Closes the connection if the session stack is empty. In mode AUTOCOMMIT commits before the connection is closed. To be called at the end of each Api call that accesses the database
      • executeInDatabaseConnection

        <T> T executeInDatabaseConnection​(Supplier<T> supplier)
        Executes the given supplier after openConnection is called and then returns the connection.
        Type Parameters:
        T - any type
        Parameters:
        supplier - a function that returns something of type T
        Returns:
        the result of the supplier
      • executeInDatabaseConnection

        default void executeInDatabaseConnection​(Runnable runnable)
        Executes the given runnable after openConnection is called and then returns the connection.
        See Also:
        executeInDatabaseConnection(Supplier)
      • initSqlSession

        void initSqlSession()
        Initializes the SqlSessionManager.
      • domainExists

        boolean domainExists​(String domain)
        Returns true if the given domain does exist in the configuration.
        Parameters:
        domain - the domain specified in the configuration
        Returns:
        true if the domain exists
      • getSqlSession

        org.apache.ibatis.session.SqlSession getSqlSession()
        retrieve the SqlSession used by taskana.
        Returns:
        the myBatis SqlSession object used by taskana
      • getEngine

        TaskanaEngine getEngine()
        Retrieve TaskanaEngine.
        Returns:
        The nested TaskanaEngine.
      • getHistoryEventManager

        HistoryEventManager getHistoryEventManager()
        Retrieve HistoryEventProducer.
        Returns:
        the HistoryEventProducer instance.
      • getTaskRoutingManager

        TaskRoutingManager getTaskRoutingManager()
        Retrieve TaskRoutingProducer.
        Returns:
        the TaskRoutingProducer instance.
      • getCreateTaskPreprocessorManager

        CreateTaskPreprocessorManager getCreateTaskPreprocessorManager()
        Retrieve CreateTaskPreprocessorManager.
        Returns:
        the CreateTaskPreprocessorManager instance.