@Test public void testBuildProxy() throws IOException { Service service = ServicePoolBuilder.create(Service.class) .withServiceFactory(_serviceFactory) .withCachingPolicy(_cachingPolicy) .withHostDiscovery(_hostDiscovery) .withPartitionFilter(_partitionFilter) .withMetricRegistry(_metricRegistry) .buildProxy(mock(RetryPolicy.class)); assertTrue(service instanceof Closeable); }
public S buildProxy(RetryPolicy retryPolicy) { return ServicePoolProxy.create(_serviceType, retryPolicy, build(), _partitionContextSupplier, true); }
ServicePoolBuilder { public S buildProxy(RetryPolicy retryPolicy) { return ServicePoolProxy.create(_serviceType, retryPolicy, build(), _partitionContextSupplier, true); } }
ServicePoolBuilder { public S buildProxy(RetryPolicy retryPolicy) { return ServicePoolProxy.create(_serviceType, retryPolicy, build(), _partitionContextSupplier, true); } private  ServicePoolBuilder(Class<S> serviceType); }
ServicePoolBuilder { public S buildProxy(RetryPolicy retryPolicy) { return ServicePoolProxy.create(_serviceType, retryPolicy, build(), _partitionContextSupplier, true); } private  ServicePoolBuilder(Class<S> serviceType); static ServicePoolBuilder<S> create(Class<S> serviceType); ServicePoolBuilder<S> withHostDiscoverySource(HostDiscoverySource hostDiscoverySource); ServicePoolBuilder<S> withHostDiscovery(final HostDiscovery hostDiscovery); ServicePoolBuilder<S> withServiceFactory(ServiceFactory<S> serviceFactory); ServicePoolBuilder<S> withHealthCheckExecutor(ScheduledExecutorService executor); ServicePoolBuilder<S> withAsyncExecutor(ExecutorService executor); ServicePoolBuilder<S> withCachingPolicy(ServiceCachingPolicy policy); ServicePoolBuilder<S> withPartitionFilter(PartitionFilter partitionFilter); ServicePoolBuilder<S> withPartitionContextAnnotations(); ServicePoolBuilder<S> withPartitionContextAnnotationsFrom(Class<? extends S> annotatedServiceClass); ServicePoolBuilder<S> withLoadBalanceAlgorithm(LoadBalanceAlgorithm algorithm); ServicePoolBuilder<S> withMetricRegistry(MetricRegistry metrics); ServicePoolBuilder<S> withHealthCheckRetryPolicy(HealthCheckRetryDelay healthCheckRetryDelay); com.bazaarvoice.ostrich.ServicePool<S> build(); com.bazaarvoice.ostrich.AsyncServicePool<S> buildAsync(); S buildProxy(RetryPolicy retryPolicy); }
ServicePoolBuilder { public S buildProxy(RetryPolicy retryPolicy) { return ServicePoolProxy.create(_serviceType, retryPolicy, build(), _partitionContextSupplier, true); } private  ServicePoolBuilder(Class<S> serviceType); static ServicePoolBuilder<S> create(Class<S> serviceType); ServicePoolBuilder<S> withHostDiscoverySource(HostDiscoverySource hostDiscoverySource); ServicePoolBuilder<S> withHostDiscovery(final HostDiscovery hostDiscovery); ServicePoolBuilder<S> withServiceFactory(ServiceFactory<S> serviceFactory); ServicePoolBuilder<S> withHealthCheckExecutor(ScheduledExecutorService executor); ServicePoolBuilder<S> withAsyncExecutor(ExecutorService executor); ServicePoolBuilder<S> withCachingPolicy(ServiceCachingPolicy policy); ServicePoolBuilder<S> withPartitionFilter(PartitionFilter partitionFilter); ServicePoolBuilder<S> withPartitionContextAnnotations(); ServicePoolBuilder<S> withPartitionContextAnnotationsFrom(Class<? extends S> annotatedServiceClass); ServicePoolBuilder<S> withLoadBalanceAlgorithm(LoadBalanceAlgorithm algorithm); ServicePoolBuilder<S> withMetricRegistry(MetricRegistry metrics); ServicePoolBuilder<S> withHealthCheckRetryPolicy(HealthCheckRetryDelay healthCheckRetryDelay); com.bazaarvoice.ostrich.ServicePool<S> build(); com.bazaarvoice.ostrich.AsyncServicePool<S> buildAsync(); S buildProxy(RetryPolicy retryPolicy);  }