Interface ThreadPool

  • All Known Implementing Classes:
    PoolDispatcher, ThreadPoolImpl

    public interface ThreadPool
    A thread pool.
    Author:
    IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
    • Method Detail

      • getPoolName

        java.lang.String getPoolName()
        Returns the pool name.
        Returns:
        pool name.
      • getNumberIdlingThreads

        int getNumberIdlingThreads()
        Returns the number of currently idling threads. Used from management tools only.
        Returns:
        number of idling threads.
      • getNumberRunningThreads

        int getNumberRunningThreads()
        Returns the number of currently running threads. Used from management tools only.
        Returns:
        number of running threads.
      • dispatchTask

        void dispatchTask​(AsyncTask asyncTask)
        Dispatch a task into the pool.
        Parameters:
        asyncTask - the task to dispatch.
      • freeze

        void freeze​(FreezeCompletionListener listener)
        Freezes this pool. That is, the current running tasks are completed but no further tasks will be scheduled until unfreeze() is called. It is possible to dispatch tasks during freeze. However, these will be executed after unfreeze() is called.
        Parameters:
        listener - will be called when the pool is freezed.
      • unfreeze

        void unfreeze()
        Unfreezes this pool.
      • stop

        void stop()
        Stops the pool. Internal use only.
      • close

        void close()
        Closes the pool. Internal use only.