All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.atomix.copycat.client.ConnectionStrategy Maven / Gradle / Ivy

There is a newer version: 1.2.8
Show newest version
/*
 * Copyright 2015 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License
 */
package io.atomix.copycat.client;

import java.time.Duration;

/**
 * Connection strategies define how clients should handle initializing connections to the cluster.
 * 

* Connection strategies are used by the {@link CopycatClient} at startup to indicate how to handle * failures when connecting to the cluster. When a client is first started, the client will attempt to * any server listed in the {@link io.atomix.catalyst.transport.Address address} list provided to the * client at startup. If the client fails to register a new session with any server, the connection * strategy will dictate how to handle the failure. *

* Connection strategies are used in the same manner when attempting to recover a lost session. In * the event that a client's connection to the cluster is lost and the client must register a new session, * if recovering the client's session fails then the connection strategy will again dictate how to * handle the failure. * * @author © 2015 - 2024 Weber Informatics LLC | Privacy Policy