Package com.caplin.motif
Class ThreadMode.SharedThreads
java.lang.Object
com.caplin.motif.ThreadMode.SharedThreads
- All Implemented Interfaces:
ThreadMode
- Enclosing interface:
- 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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.caplin.motif.ThreadMode
ThreadMode.NewThread, ThreadMode.ScheduledExecutorWrapper, ThreadMode.SharedThreads
-
Constructor Summary
ConstructorDescriptionUses a default number of threads for the pool, which is equal to the number of available processors.SharedThreads
(int threadPoolSize) Allows the user to customise the number of threads for the pool. -
Method Summary
-
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
-
getScheduledExecutorWrapper
- Specified by:
getScheduledExecutorWrapper
in interfaceThreadMode
-
toString
-