@Override public ExecutorService get() { return InternalExecutorServiceFactory.create(threadSupplier); } }));
@Override public ExecutorService get() { return InternalExecutorServiceFactory.create(threadSupplier); } });
@Override public ExecutorService get() { return InternalExecutorServiceFactory.create(new BiFunction<Runnable, String, Thread>() { @Override public Thread apply(Runnable r, String threadName) { return new Thread(Thread.currentThread().getThreadGroup(), r, threadName); } }, alias); } });
/** * Creates an executor service that creates thread's based on the <code>thread supplier</code> * @param threadSupplier The thread supplier * @return An executor service that will use the thread created by the <code>threadSupplier</code> when polling */ public static ExecutorService create(final Function<Runnable, Thread> threadSupplier) { if (threadSupplier == null) { throw new IllegalArgumentException("Condition evaluation thread supplier cannot be null"); } return create(new BiFunction<Runnable, String, Thread>() { @Override public Thread apply(Runnable runnable, String __) { return threadSupplier.apply(runnable); } }, null); }
@Override public ExecutorService get() { return InternalExecutorServiceFactory.create(threadSupplier); } });
@Override public ExecutorService get() { return InternalExecutorServiceFactory.create(threadSupplier); } }));
@Override public ExecutorService get() { return InternalExecutorServiceFactory.create(new BiFunction<Runnable, String, Thread>() { @Override public Thread apply(Runnable r, String threadName) { return new Thread(Thread.currentThread().getThreadGroup(), r, threadName); } }, alias); } });
/** * Creates an executor service that creates thread's based on the <code>thread supplier</code> * @param threadSupplier The thread supplier * @return An executor service that will use the thread created by the <code>threadSupplier</code> when polling */ public static ExecutorService create(final Function<Runnable, Thread> threadSupplier) { if (threadSupplier == null) { throw new IllegalArgumentException("Condition evaluation thread supplier cannot be null"); } return create(new BiFunction<Runnable, String, Thread>() { @Override public Thread apply(Runnable runnable, String __) { return threadSupplier.apply(runnable); } }, null); }