All Downloads are FREE. Search and download functionalities are using the official Maven repository.

quickfix.ExecutorFactory Maven / Gradle / Ivy

There is a newer version: 2.3.1
Show newest version
package quickfix;

import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

/**
 * 

* Two Executors are required. The {@link #getLongLivedExecutor()} is used for message processing and the * {@link #getShortLivedExecutor()} is used for timer tasks. They can both be the same underlying Executor if desired. * Separating them allows for additional control such as with a ResourceAdapter WorkManager where the WorkManager * differentiates between short and long lived Work. *

*

* By way of example, a single {@link Executors#newCachedThreadPool()} satisfies the requirements but really adds * nothing over the default behavior. *

*/ public interface ExecutorFactory { /** * The message processing activities are long-lived so this Executor must have sufficient distinct Threads available * to handle all your Sessions. The exact number will depend on how many concurrent Sessions you will have and * whether you are using the Threaded or non-Threaded SocketAcceptors/Initiators. */ Executor getLongLivedExecutor(); /** * The timer tasks are short-lived and only require one Thread (calls are serialized). */ Executor getShortLivedExecutor(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy