@Override protected SubmitterExecutorFactory getSubmitterExecutorFactory() { return new UnfairExecutorFactory(TaskHashXorTimeStripeGenerator.instance()); }
/** * Constructs a new {@link UnfairExecutor} with a provided thread count. This also defaults * to using the {@link TaskHashXorTimeStripeGenerator}. * * @param threadCount Number of threads, recommended to be a prime number * @param useDaemonThreads {@code true} if created threads should be daemon */ public UnfairExecutor(int threadCount, boolean useDaemonThreads) { this(threadCount, useDaemonThreads, TaskHashXorTimeStripeGenerator.instance()); }
/** * Constructs a new {@link UnfairExecutor} with a provided thread count. This defaults to using * daemon threads. This also defaults to using the {@link TaskHashXorTimeStripeGenerator}. * * @param threadCount Number of threads, recommended to be a prime number */ public UnfairExecutor(int threadCount) { this(threadCount, true, TaskHashXorTimeStripeGenerator.instance()); }
/** * Constructs a new {@link UnfairExecutor} with a provided thread count. This defaults to using * daemon threads. This also defaults to using the {@link TaskHashXorTimeStripeGenerator}. * * @param threadCount Number of threads, recommended to be a prime number */ public UnfairExecutor(int threadCount) { this(threadCount, true, TaskHashXorTimeStripeGenerator.instance()); }
/** * Constructs a new {@link UnfairExecutor} with a provided thread count and factory. This also * defaults to using the {@link TaskHashXorTimeStripeGenerator}. * * @param threadCount Number of threads, recommended to be a prime number * @param threadFactory thread factory for producing new threads within executor */ public UnfairExecutor(int threadCount, ThreadFactory threadFactory) { this(threadCount, threadFactory, TaskHashXorTimeStripeGenerator.instance()); }
/** * Constructs a new {@link UnfairExecutor} with a provided thread count and factory. This also * defaults to using the {@link TaskHashXorTimeStripeGenerator}. * * @param threadCount Number of threads, recommended to be a prime number * @param threadFactory thread factory for producing new threads within executor */ public UnfairExecutor(int threadCount, ThreadFactory threadFactory) { this(threadCount, threadFactory, TaskHashXorTimeStripeGenerator.instance()); }
/** * Constructs a new {@link UnfairExecutor} with a provided thread count. This also defaults * to using the {@link TaskHashXorTimeStripeGenerator}. * * @param threadCount Number of threads, recommended to be a prime number * @param useDaemonThreads {@code true} if created threads should be daemon */ public UnfairExecutor(int threadCount, boolean useDaemonThreads) { this(threadCount, useDaemonThreads, TaskHashXorTimeStripeGenerator.instance()); }