@Override public <R> Collection<Future<R>> executeOnAll(RetryPolicy retry, ServiceCallback<S, R> callback) { return executeOn(ALL_END_POINTS, retry, callback); }
/** * Builds a {@code com.bazaarvoice.ostrich.AsyncServicePool}. * * @return The {@code com.bazaarvoice.ostrich.AsyncServicePool} that was constructed. */ public com.bazaarvoice.ostrich.AsyncServicePool<S> buildAsync() { ServicePool<S> pool = buildInternal(); boolean shutdownAsyncExecutorOnClose = (_asyncExecutor == null); if (_asyncExecutor == null) { ThreadFactory threadFactory = new ThreadFactoryBuilder() .setNameFormat(_serviceName + "-AsyncExecutorThread-%d") .setDaemon(true) .build(); _asyncExecutor = Executors.newCachedThreadPool(threadFactory); } return new AsyncServicePool<>(Ticker.systemTicker(), pool, true, _asyncExecutor, shutdownAsyncExecutorOnClose, _metrics); }
/** * Builds a {@code com.bazaarvoice.ostrich.AsyncServicePool}. * * @return The {@code com.bazaarvoice.ostrich.AsyncServicePool} that was constructed. */ public com.bazaarvoice.ostrich.AsyncServicePool<S> buildAsync() { ServicePool<S> pool = buildInternal(); boolean shutdownAsyncExecutorOnClose = (_asyncExecutor == null); if (_asyncExecutor == null) { ThreadFactory threadFactory = new ThreadFactoryBuilder() .setNameFormat(_serviceName + "-AsyncExecutorThread-%d") .setDaemon(true) .build(); _asyncExecutor = Executors.newCachedThreadPool(threadFactory); } return new AsyncServicePool<>(Ticker.systemTicker(), pool, true, _asyncExecutor, shutdownAsyncExecutorOnClose, _metrics); }
@Override public <R> Collection<Future<R>> executeOnAll(RetryPolicy retry, ServiceCallback<S, R> callback) { return executeOn(ALL_END_POINTS, retry, callback); }