@VisibleForTesting static CassandraClientPoolImpl createImplForTest( MetricsManager metricsManager, CassandraKeyValueServiceConfig config, StartupChecks startupChecks, Blacklist blacklist) { CassandraRequestExceptionHandler exceptionHandler = testExceptionHandler(blacklist); CassandraClientPoolImpl cassandraClientPool = new CassandraClientPoolImpl( metricsManager, config, startupChecks, exceptionHandler, blacklist); cassandraClientPool.wrapper.initialize(AtlasDbConstants.DEFAULT_INITIALIZE_ASYNC); return cassandraClientPool; }
@VisibleForTesting static CassandraClientPoolImpl createImplForTest( MetricsManager metricsManager, CassandraKeyValueServiceConfig config, StartupChecks startupChecks, ScheduledExecutorService refreshDaemon, Blacklist blacklist, CassandraService cassandra) { CassandraRequestExceptionHandler exceptionHandler = testExceptionHandler(blacklist); CassandraClientPoolImpl cassandraClientPool = new CassandraClientPoolImpl( metricsManager, config, startupChecks, refreshDaemon, exceptionHandler, blacklist, cassandra); cassandraClientPool.wrapper.initialize(AtlasDbConstants.DEFAULT_INITIALIZE_ASYNC); return cassandraClientPool; }
public static CassandraClientPool create(MetricsManager metricsManager, CassandraKeyValueServiceConfig config, Supplier<CassandraKeyValueServiceRuntimeConfig> runtimeConfig, boolean initializeAsync) { Blacklist blacklist = new Blacklist(config); CassandraRequestExceptionHandler exceptionHandler = new CassandraRequestExceptionHandler( () -> runtimeConfig.get().numberOfRetriesOnSameHost(), () -> runtimeConfig.get().numberOfRetriesOnAllHosts(), () -> runtimeConfig.get().conservativeRequestExceptionHandler(), blacklist); CassandraClientPoolImpl cassandraClientPool = new CassandraClientPoolImpl( metricsManager, config, StartupChecks.RUN, exceptionHandler, blacklist); cassandraClientPool.wrapper.initialize(initializeAsync); return cassandraClientPool.wrapper.isInitialized() ? cassandraClientPool : cassandraClientPool.wrapper; }
@VisibleForTesting static CassandraClientPoolImpl createImplForTest( MetricsManager metricsManager, CassandraKeyValueServiceConfig config, StartupChecks startupChecks, Blacklist blacklist) { CassandraRequestExceptionHandler exceptionHandler = testExceptionHandler(blacklist); CassandraClientPoolImpl cassandraClientPool = new CassandraClientPoolImpl( metricsManager, config, startupChecks, exceptionHandler, blacklist); cassandraClientPool.wrapper.initialize(AtlasDbConstants.DEFAULT_INITIALIZE_ASYNC); return cassandraClientPool; }
@VisibleForTesting static CassandraClientPoolImpl createImplForTest( MetricsManager metricsManager, CassandraKeyValueServiceConfig config, StartupChecks startupChecks, ScheduledExecutorService refreshDaemon, Blacklist blacklist, CassandraService cassandra) { CassandraRequestExceptionHandler exceptionHandler = testExceptionHandler(blacklist); CassandraClientPoolImpl cassandraClientPool = new CassandraClientPoolImpl( metricsManager, config, startupChecks, refreshDaemon, exceptionHandler, blacklist, cassandra); cassandraClientPool.wrapper.initialize(AtlasDbConstants.DEFAULT_INITIALIZE_ASYNC); return cassandraClientPool; }
public static CassandraClientPool create(MetricsManager metricsManager, CassandraKeyValueServiceConfig config, Supplier<CassandraKeyValueServiceRuntimeConfig> runtimeConfig, boolean initializeAsync) { Blacklist blacklist = new Blacklist(config); CassandraRequestExceptionHandler exceptionHandler = new CassandraRequestExceptionHandler( () -> runtimeConfig.get().numberOfRetriesOnSameHost(), () -> runtimeConfig.get().numberOfRetriesOnAllHosts(), () -> runtimeConfig.get().conservativeRequestExceptionHandler(), blacklist); CassandraClientPoolImpl cassandraClientPool = new CassandraClientPoolImpl( metricsManager, config, StartupChecks.RUN, exceptionHandler, blacklist); cassandraClientPool.wrapper.initialize(initializeAsync); return cassandraClientPool.wrapper.isInitialized() ? cassandraClientPool : cassandraClientPool.wrapper; }