/** * Creates a fixed thread pool with named daemon threads that will expire after 60 seconds of * inactivity. * @param nThreads * @param name * @return */ public static ExecutorService newFixedThreadPool(int nThreads, String name) { return newFixedThreadPool(nThreads, Integer.MAX_VALUE, name); }
/** * Constructs a new Timer that directly executes tasks off of a single-thread thread pool. * @param name */ public EnhancedTimer(final String name) { this.taskExecutor = ExecutorUtils.getDirectExecutor(); this.bossExecutor = ExecutorUtils.newFixedThreadPool(1, name); }
/** * Creates a fixed thread pool with named daemon threads that will expire after 60 seconds of * inactivity. * @param nThreads * @param name * @return */ public static ExecutorService newFixedThreadPool(int nThreads, String name) { return newFixedThreadPool(nThreads, Integer.MAX_VALUE, name); }
/** * Constructs a new Timer that directly executes tasks off of a single-thread thread pool. * @param name */ public EnhancedTimer(final String name) { this.taskExecutor = ExecutorUtils.getDirectExecutor(); this.bossExecutor = ExecutorUtils.newFixedThreadPool(1, name); }
timeoutExecutor = new TracedExecutorService(ExecutorUtils.newFixedThreadPool(3, "Server Side Timeout"), GlobalTracerInjector.getTracer()); //$NON-NLS-1$ this.cancellationTimer = new EnhancedTimer(timeoutExecutor, timeoutExecutor); this.maxActivePlans = config.getMaxActivePlans();
timeoutExecutor = ExecutorUtils.newFixedThreadPool(3, "Server Side Timeout"); //$NON-NLS-1$ this.cancellationTimer = new EnhancedTimer(timeoutExecutor, timeoutExecutor); this.maxActivePlans = config.getMaxActivePlans();
timeoutExecutor = new TracedExecutorService(ExecutorUtils.newFixedThreadPool(3, "Server Side Timeout"), GlobalTracerInjector.getTracer()); //$NON-NLS-1$ this.cancellationTimer = new EnhancedTimer(timeoutExecutor, timeoutExecutor); this.maxActivePlans = config.getMaxActivePlans();