/** * Creates the {@code ExecutorService} to be used. This method is called if * no {@code ExecutorService} was provided at construction time. * * @return the {@code ExecutorService} to be used */ private ExecutorService createExecutor() { return Executors.newFixedThreadPool(getTaskCount()); }
/** * Returns the number of tasks needed for executing all child {@code * BackgroundInitializer} objects in parallel. This implementation sums up * the required tasks for all child initializers (which is necessary if one * of the child initializers is itself a {@code MultiBackgroundInitializer} * ). Then it adds 1 for the control task that waits for the completion of * the children. * * @return the number of tasks required for background processing */ @Override protected int getTaskCount() { int result = 1; for (final BackgroundInitializer<?> bi : childInitializers.values()) { result += bi.getTaskCount(); } return result; }
/** * Creates the {@code ExecutorService} to be used. This method is called if * no {@code ExecutorService} was provided at construction time. * * @return the {@code ExecutorService} to be used */ private ExecutorService createExecutor() { return Executors.newFixedThreadPool(getTaskCount()); }
/** * Creates the {@code ExecutorService} to be used. This method is called if * no {@code ExecutorService} was provided at construction time. * * @return the {@code ExecutorService} to be used */ private ExecutorService createExecutor() { return Executors.newFixedThreadPool(getTaskCount()); }
/** * Creates the {@code ExecutorService} to be used. This method is called if * no {@code ExecutorService} was provided at construction time. * * @return the {@code ExecutorService} to be used */ private ExecutorService createExecutor() { return Executors.newFixedThreadPool(getTaskCount()); }
/** * Returns the number of tasks needed for executing all child {@code * BackgroundInitializer} objects in parallel. This implementation sums up * the required tasks for all child initializers (which is necessary if one * of the child initializers is itself a {@code MultiBackgroundInitializer} * ). Then it adds 1 for the control task that waits for the completion of * the children. * * @return the number of tasks required for background processing */ @Override protected int getTaskCount() { int result = 1; for (final BackgroundInitializer<?> bi : childInitializers.values()) { result += bi.getTaskCount(); } return result; }
/** * Returns the number of tasks needed for executing all child {@code * BackgroundInitializer} objects in parallel. This implementation sums up * the required tasks for all child initializers (which is necessary if one * of the child initializers is itself a {@code MultiBackgroundInitializer} * ). Then it adds 1 for the control task that waits for the completion of * the children. * * @return the number of tasks required for background processing */ @Override protected int getTaskCount() { int result = 1; for (final BackgroundInitializer<?> bi : childInitializers.values()) { result += bi.getTaskCount(); } return result; }
/** * Returns the number of tasks needed for executing all child {@code * BackgroundInitializer} objects in parallel. This implementation sums up * the required tasks for all child initializers (which is necessary if one * of the child initializers is itself a {@code MultiBackgroundInitializer} * ). Then it adds 1 for the control task that waits for the completion of * the children. * * @return the number of tasks required for background processing */ @Override protected int getTaskCount() { int result = 1; for (final BackgroundInitializer<?> bi : childInitializers.values()) { result += bi.getTaskCount(); } return result; }