Class ThreadMode.SharedThreads

java.lang.Object
com.caplin.motif.ThreadMode.SharedThreads
All Implemented Interfaces:
ThreadMode
Enclosing interface:
ThreadMode

public static final class ThreadMode.SharedThreads extends 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 Details

    • 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.
  • Method Details