Host( InetSocketAddress address, ConvictionPolicy.Factory convictionPolicyFactory, Cluster.Manager manager) { if (address == null || convictionPolicyFactory == null) throw new NullPointerException(); this.address = address; this.convictionPolicy = convictionPolicyFactory.create(this, manager.reconnectionPolicy()); this.manager = manager; this.defaultExecutionInfo = new ExecutionInfo(this); this.state = State.ADDED; }
speculativeExecutionPolicy().close(); configuration.getPolicies().getRetryPolicy().close(); reconnectionPolicy().close(); configuration.getPolicies().getAddressTranslator().close(); for (LatencyTracker tracker : latencyTrackers) tracker.onUnregister(Cluster.this);
"Control connection", cluster.reconnectionExecutor, cluster.reconnectionPolicy().newSchedule(), reconnectionAttempt, initialDelayMs) {
new AbstractReconnectionHandler(host.toString(), reconnectionExecutor, reconnectionPolicy().newSchedule(), host.reconnectionAttempt, 0) {
new AbstractReconnectionHandler(host.toString(), reconnectionExecutor, reconnectionPolicy().newSchedule(), host.reconnectionAttempt, 0) {
speculativeExecutionPolicy().close(); configuration.getPolicies().getRetryPolicy().close(); reconnectionPolicy().close(); configuration.getPolicies().getAddressTranslator().close(); for (LatencyTracker tracker : latencyTrackers)
speculativeExecutionPolicy().close(); configuration.getPolicies().getRetryPolicy().close(); reconnectionPolicy().close(); configuration.getPolicies().getAddressTranslator().close(); for (LatencyTracker tracker : latencyTrackers)
void startPeriodicReconnectionAttempt(final Host host, final boolean isHostAddition) { new AbstractReconnectionHandler(host.toString(), reconnectionExecutor, reconnectionPolicy().newSchedule(), host.reconnectionAttempt) {
} catch (NoHostAvailableException e) { logger.error("[Control connection] Cannot connect to any host, scheduling retry"); new AbstractReconnectionHandler(cluster.reconnectionExecutor, cluster.reconnectionPolicy().newSchedule(), reconnectionAttempt) { @Override protected Connection tryReconnect() throws ConnectionException {
ReconnectionPolicy reconnectionPolicy() { return cluster.manager.reconnectionPolicy(); }
ReconnectionPolicy reconnectionPolicy() { return cluster.manager.reconnectionPolicy(); }
ReconnectionPolicy reconnectionPolicy() { return cluster.manager.reconnectionPolicy(); }
ReconnectionPolicy reconnectionPolicy() { return cluster.manager.reconnectionPolicy(); }
Host(InetSocketAddress address, ConvictionPolicy.Factory convictionPolicyFactory, Cluster.Manager manager) { if (address == null || convictionPolicyFactory == null) throw new NullPointerException(); this.address = address; this.convictionPolicy = convictionPolicyFactory.create(this, manager.reconnectionPolicy()); this.manager = manager; this.defaultExecutionInfo = new ExecutionInfo(ImmutableList.of(this)); this.state = State.ADDED; }
Host(InetSocketAddress address, ConvictionPolicy.Factory convictionPolicyFactory, Cluster.Manager manager) { if (address == null || convictionPolicyFactory == null) throw new NullPointerException(); this.address = address; this.convictionPolicy = convictionPolicyFactory.create(this, manager.reconnectionPolicy()); this.manager = manager; this.defaultExecutionInfo = new ExecutionInfo(ImmutableList.of(this)); this.state = State.ADDED; }
Host(InetSocketAddress address, ConvictionPolicy.Factory convictionPolicyFactory, Cluster.Manager manager) { if (address == null || convictionPolicyFactory == null) throw new NullPointerException(); this.address = address; this.convictionPolicy = convictionPolicyFactory.create(this, manager.reconnectionPolicy()); this.manager = manager; this.defaultExecutionInfo = new ExecutionInfo(ImmutableList.of(this)); this.state = State.ADDED; }
reconnectionPolicy().init(Cluster.this); configuration.getPolicies().getAddressTranslator().init(Cluster.this); for (LatencyTracker tracker : latencyTrackers) tracker.onRegister(Cluster.this);
host.toString(), reconnectionExecutor, reconnectionPolicy().newSchedule(), host.reconnectionAttempt) {
host.toString(), reconnectionExecutor, reconnectionPolicy().newSchedule(), host.reconnectionAttempt, 0) {
ReconnectionPolicy reconnectionPolicy() { return cluster.manager.reconnectionPolicy(); }