public class FatalFailureConnectionStrategy extends Object implements ConnectionStrategy
Couple of examples are given below. The assumption is that there are three servers MAIN, DR1 and DR2. The 1. Currently the client is connected with DR1. A disconnect with DR1 occurs, and then the client tries connecting to DR2, MAIN and DR1. It attempts this for a preconfigured number of times (e.g. 3 times). So for example, the following events occur: --a. Connection attempt no 1 with DR2: failed --b. Connection attempt no 1 with MAIN: failed --c. Connection attempt no 1 with DR1: failed --d. Connection attempt no 2 with DR2: succeeded. No fatal failure event is raised. 2. Now the client is on DR2 and a disconnect with DR2 occurs. Following events occur --a. Connection attempt no 1 with MAIN: failed --b. Connection attempt no 1 with DR1: failed --c. Connection attempt no 1 with DR2: failed --d. Connection attempt no 2 with MAIN: failed --e. Connection attempt no 2 with DR1: failed --f. Connection attempt no 2 with DR2: failed --g. Connection attempt no 3 with MAIN: failed --h. Connection attempt no 3 with DR1: failed --i. Connection attempt no 3 with DR2: failed => Attempt 3 finished. Fatal Failure is raised
| Constructor and Description |
|---|
FatalFailureConnectionStrategy() |
| Modifier and Type | Method and Description |
|---|---|
SocketChannel |
connect(String name,
SocketAddressSupplier socketAddressSupplier,
NetworkStatsListener<? extends NetworkContext> networkStatsListener,
boolean hasLoggedInPreviously) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitopenSocketChannelpublic SocketChannel connect(String name, SocketAddressSupplier socketAddressSupplier, NetworkStatsListener<? extends NetworkContext> networkStatsListener, boolean hasLoggedInPreviously)
connect in interface ConnectionStrategyCopyright © 2017. All rights reserved.