接口 ExecutorRepository

    • 方法详细资料

      • createExecutorIfAbsent

        ExecutorService createExecutorIfAbsent​(URL url)
        Called by both Client and Server. TODO, consider separate these two parts. When the Client or Server starts for the first time, generate a new threadpool according to the parameters specified.
        参数:
        url -
        返回:
      • updateThreadpool

        void updateThreadpool​(URL url,
                              ExecutorService executor)
        Modify some of the threadpool's properties according to the url, for example, coreSize, maxSize, ...
        参数:
        url -
        executor -
      • nextScheduledExecutor

        ScheduledExecutorService nextScheduledExecutor()
        Returns a scheduler from the scheduler list, call this method whenever you need a scheduler for a cron job. If your cron cannot burden the possible schedule delay caused by sharing the same scheduler, please consider define a dedicate one.
        返回:
      • getSharedExecutor

        ExecutorService getSharedExecutor()
        Get the default shared threadpool.
        返回:
      • destroyAll

        void destroyAll()
        Destroy all executors that are not in shutdown state