/** * Creates a new instance with the specified {@link Executor}. * * @param executor the user's managed Executor to use in this filter */ public ExecutorFilter(Executor executor) { // Initialize the filter init(executor, NOT_MANAGEABLE_EXECUTOR); }
/** * Creates a new instance with the specified {@link Executor}. * * @param executor the user's managed Executor to use in this filter * @param eventTypes The event for which the executor will be used */ public ExecutorFilter(Executor executor, IoEventType... eventTypes) { // Initialize the filter init(executor, NOT_MANAGEABLE_EXECUTOR, eventTypes); }
/** * Creates a new instance with the specified {@link Executor}. * * @param executor the user's managed Executor to use in this filter * @param eventTypes The event for which the executor will be used */ public ExecutorFilter(Executor executor, IoEventType... eventTypes) { // Initialize the filter init(executor, NOT_MANAGEABLE_EXECUTOR, eventTypes); }
/** * Creates a new instance with the specified {@link Executor}. * * @param executor the user's managed Executor to use in this filter */ public ExecutorFilter(Executor executor) { // Initialize the filter init(executor, NOT_MANAGEABLE_EXECUTOR); }
/** * Creates a new instance with the specified {@link Executor}. * * @param executor the user's managed Executor to use in this filter */ public ExecutorFilter(Executor executor) { // Initialize the filter init(executor, NOT_MANAGEABLE_EXECUTOR); }
/** * Creates a new instance with the specified {@link Executor}. * * @param executor the user's managed Executor to use in this filter * @param eventTypes The event for which the executor will be used */ public ExecutorFilter(Executor executor, IoEventType... eventTypes) { // Initialize the filter init(executor, NOT_MANAGEABLE_EXECUTOR, eventTypes); }
/** * (Convenience constructor) Creates a new instance with a new * {@link OrderedThreadPoolExecutor}. * * @param eventTypes The event for which the executor will be used */ public ExecutorFilter(IoEventType... eventTypes) { // Create a new default Executor Executor newExecutor = createDefaultExecutor(BASE_THREAD_NUMBER, DEFAULT_MAX_POOL_SIZE, DEFAULT_KEEPALIVE_TIME, TimeUnit.SECONDS, Executors.defaultThreadFactory(), null); // Initialize the filter init(newExecutor, MANAGEABLE_EXECUTOR, eventTypes); }
/** * (Convenience constructor) Creates a new instance with a new * {@link OrderedThreadPoolExecutor}, no thread in the pool, and a * maximum of 16 threads in the pool. All the event will be handled * by this default executor. */ public ExecutorFilter() { // Create a new default Executor Executor newExecutor = createDefaultExecutor(BASE_THREAD_NUMBER, DEFAULT_MAX_POOL_SIZE, DEFAULT_KEEPALIVE_TIME, TimeUnit.SECONDS, Executors.defaultThreadFactory(), null); // Initialize the filter init(newExecutor, MANAGEABLE_EXECUTOR); }
/** * (Convenience constructor) Creates a new instance with a new * {@link OrderedThreadPoolExecutor}. * * @param maximumPoolSize The maximum pool size * @param eventTypes The event for which the executor will be used */ public ExecutorFilter(int maximumPoolSize, IoEventType... eventTypes) { // Create a new default Executor Executor newExecutor = createDefaultExecutor(BASE_THREAD_NUMBER, maximumPoolSize, DEFAULT_KEEPALIVE_TIME, TimeUnit.SECONDS, Executors.defaultThreadFactory(), null); // Initialize the filter init(newExecutor, MANAGEABLE_EXECUTOR, eventTypes); }
/** * (Convenience constructor) Creates a new instance with a new * {@link OrderedThreadPoolExecutor}. * * @param maximumPoolSize The maximum pool size * @param eventTypes The event for which the executor will be used */ public ExecutorFilter(int maximumPoolSize, IoEventType... eventTypes) { // Create a new default Executor Executor newExecutor = createDefaultExecutor(BASE_THREAD_NUMBER, maximumPoolSize, DEFAULT_KEEPALIVE_TIME, TimeUnit.SECONDS, Executors.defaultThreadFactory(), null); // Initialize the filter init(newExecutor, MANAGEABLE_EXECUTOR, eventTypes); }
/** * (Convenience constructor) Creates a new instance with a new * {@link OrderedThreadPoolExecutor}, no thread in the pool, and a * maximum of 16 threads in the pool. All the event will be handled * by this default executor. */ public ExecutorFilter() { // Create a new default Executor Executor newExecutor = createDefaultExecutor(BASE_THREAD_NUMBER, DEFAULT_MAX_POOL_SIZE, DEFAULT_KEEPALIVE_TIME, TimeUnit.SECONDS, Executors.defaultThreadFactory(), null); // Initialize the filter init(newExecutor, MANAGEABLE_EXECUTOR); }
/** * (Convenience constructor) Creates a new instance with a new * {@link OrderedThreadPoolExecutor}. * * @param eventTypes The event for which the executor will be used */ public ExecutorFilter(IoEventType... eventTypes) { // Create a new default Executor Executor newExecutor = createDefaultExecutor(BASE_THREAD_NUMBER, DEFAULT_MAX_POOL_SIZE, DEFAULT_KEEPALIVE_TIME, TimeUnit.SECONDS, Executors.defaultThreadFactory(), null); // Initialize the filter init(newExecutor, MANAGEABLE_EXECUTOR, eventTypes); }
/** * (Convenience constructor) Creates a new instance with a new * {@link OrderedThreadPoolExecutor}, no thread in the pool, but * a maximum of threads in the pool is given. All the event will be handled * by this default executor. * * @param maximumPoolSize The maximum pool size */ public ExecutorFilter(int maximumPoolSize) { // Create a new default Executor Executor newExecutor = createDefaultExecutor(BASE_THREAD_NUMBER, maximumPoolSize, DEFAULT_KEEPALIVE_TIME, TimeUnit.SECONDS, Executors.defaultThreadFactory(), null); // Initialize the filter init(newExecutor, MANAGEABLE_EXECUTOR); }
/** * (Convenience constructor) Creates a new instance with a new * {@link OrderedThreadPoolExecutor}. * * @param corePoolSize The initial pool size * @param maximumPoolSize The maximum pool size * @param eventTypes The event for which the executor will be used */ public ExecutorFilter(int corePoolSize, int maximumPoolSize, IoEventType... eventTypes) { // Create a new default Executor Executor newExecutor = createDefaultExecutor(corePoolSize, maximumPoolSize, DEFAULT_KEEPALIVE_TIME, TimeUnit.SECONDS, Executors.defaultThreadFactory(), null); // Initialize the filter init(newExecutor, MANAGEABLE_EXECUTOR, eventTypes); }
/** * (Convenience constructor) Creates a new instance with a new * {@link OrderedThreadPoolExecutor}. * * @param corePoolSize The initial pool size * @param maximumPoolSize The maximum pool size * @param eventTypes The event for which the executor will be used */ public ExecutorFilter(int corePoolSize, int maximumPoolSize, IoEventType... eventTypes) { // Create a new default Executor Executor newExecutor = createDefaultExecutor(corePoolSize, maximumPoolSize, DEFAULT_KEEPALIVE_TIME, TimeUnit.SECONDS, Executors.defaultThreadFactory(), null); // Initialize the filter init(newExecutor, MANAGEABLE_EXECUTOR, eventTypes); }
/** * (Convenience constructor) Creates a new instance with a new * {@link OrderedThreadPoolExecutor}, a number of thread to start with, a * maximum of threads the pool can contain. All the event will be handled * by this default executor. * * @param corePoolSize The initial pool size * @param maximumPoolSize The maximum pool size */ public ExecutorFilter(int corePoolSize, int maximumPoolSize) { // Create a new default Executor Executor newExecutor = createDefaultExecutor(corePoolSize, maximumPoolSize, DEFAULT_KEEPALIVE_TIME, TimeUnit.SECONDS, Executors.defaultThreadFactory(), null); // Initialize the filter init(newExecutor, MANAGEABLE_EXECUTOR); }
/** * (Convenience constructor) Creates a new instance with a new * {@link OrderedThreadPoolExecutor}. * * @param corePoolSize The initial pool size * @param maximumPoolSize The maximum pool size * @param keepAliveTime Default duration for a thread * @param unit Time unit used for the keepAlive value */ public ExecutorFilter(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit) { // Create a new default Executor Executor newExecutor = createDefaultExecutor(corePoolSize, maximumPoolSize, keepAliveTime, unit, Executors.defaultThreadFactory(), null); // Initialize the filter init(newExecutor, MANAGEABLE_EXECUTOR); }
/** * (Convenience constructor) Creates a new instance with a new * {@link OrderedThreadPoolExecutor}, no thread in the pool, but * a maximum of threads in the pool is given. All the event will be handled * by this default executor. * * @param maximumPoolSize The maximum pool size */ public ExecutorFilter(int maximumPoolSize) { // Create a new default Executor Executor newExecutor = createDefaultExecutor(BASE_THREAD_NUMBER, maximumPoolSize, DEFAULT_KEEPALIVE_TIME, TimeUnit.SECONDS, Executors.defaultThreadFactory(), null); // Initialize the filter init(newExecutor, MANAGEABLE_EXECUTOR); }
/** * (Convenience constructor) Creates a new instance with a new * {@link OrderedThreadPoolExecutor}. * * @param corePoolSize The initial pool size * @param maximumPoolSize The maximum pool size * @param keepAliveTime Default duration for a thread * @param unit Time unit used for the keepAlive value * @param queueHandler The queue used to store events */ public ExecutorFilter(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, IoEventQueueHandler queueHandler) { // Create a new default Executor Executor newExecutor = createDefaultExecutor(corePoolSize, maximumPoolSize, keepAliveTime, unit, Executors.defaultThreadFactory(), queueHandler); // Initialize the filter init(newExecutor, MANAGEABLE_EXECUTOR); }
/** * (Convenience constructor) Creates a new instance with a new * {@link OrderedThreadPoolExecutor}. * * @param corePoolSize The initial pool size * @param maximumPoolSize The maximum pool size * @param keepAliveTime Default duration for a thread * @param unit Time unit used for the keepAlive value * @param threadFactory The factory used to create threads */ public ExecutorFilter(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, ThreadFactory threadFactory) { // Create a new default Executor Executor newExecutor = createDefaultExecutor(corePoolSize, maximumPoolSize, keepAliveTime, unit, threadFactory, null); // Initialize the filter init(newExecutor, MANAGEABLE_EXECUTOR); }