/** * Creates an {@link Executor}. * This method is invoked during the initialization for asynchronous write/touch job executions. * @return an {@link Executor} */ protected Executor createAsyncWriteExecutor() { Executor asyncExecutor; if (dataStore.getAsyncUploadLimit() > 0 && getAsyncWritePoolSize() > 0) { asyncExecutor = (ThreadPoolExecutor) Executors.newFixedThreadPool(getAsyncWritePoolSize(), new NamedThreadFactory(getClass().getSimpleName() + "-write-worker")); } else { asyncExecutor = new ImmediateExecutor(); } return asyncExecutor; }
/** * Creates an {@link Executor}. * This method is invoked during the initialization for asynchronous write/touch job executions. * @return an {@link Executor} */ protected Executor createAsyncWriteExecutor() { Executor asyncExecutor; if (dataStore.getAsyncUploadLimit() > 0 && getAsyncWritePoolSize() > 0) { asyncExecutor = (ThreadPoolExecutor) Executors.newFixedThreadPool(getAsyncWritePoolSize(), new NamedThreadFactory(getClass().getSimpleName() + "-write-worker")); } else { asyncExecutor = new ImmediateExecutor(); } return asyncExecutor; }
/** * Creates an {@link Executor}. * This method is invoked during the initialization for asynchronous write/touch job executions. * @return an {@link Executor} */ protected Executor createAsyncWriteExecutor() { Executor asyncExecutor; if (dataStore.getAsyncUploadLimit() > 0 && getAsyncWritePoolSize() > 0) { asyncExecutor = (ThreadPoolExecutor) Executors.newFixedThreadPool(getAsyncWritePoolSize(), new NamedThreadFactory(getClass().getSimpleName() + "-write-worker")); } else { asyncExecutor = new ImmediateExecutor(); } return asyncExecutor; }