Class ThreadMode.SharedThreads

  • All Implemented Interfaces:
    ThreadMode
    Enclosing interface:
    ThreadMode

    public static final class ThreadMode.SharedThreads
    extends java.lang.Object
    implements ThreadMode
    Will provide each trade an executor which will be shared by many trades. Assignment is round-robin. Trade listeners must be asynchronous and must not block one another.
    • Constructor Detail

      • SharedThreads

        public SharedThreads()
        Uses a default number of threads for the pool, which is equal to the number of available processors.
      • SharedThreads

        public SharedThreads​(int threadPoolSize)
        Allows the user to customise the number of threads for the pool.
        Parameters:
        threadPoolSize - The number of threads to keep in the pool.