Package io.hekate.network
Interface NetworkServerFailure.Resolution
-
- Enclosing interface:
- NetworkServerFailure
public static interface NetworkServerFailure.Resolution
Resolution ofNetworkServerFailure
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isFailure()
Returnstrue
if failure is unrecoverable andfalse
if error is recoverable and failover actions should be performed by the server.InetSocketAddress
retryAddress()
Returns a new address that the server should try during its failover actions.long
retryDelay()
Returns the amount of time in milliseconds for server to wait before performing another failover attempt.NetworkServerFailure.Resolution
withRetryAddress(InetSocketAddress address)
Sets the new address that server should try during its failover actions.NetworkServerFailure.Resolution
withRetryDelay(long delay)
Sets the amount of time in milliseconds for server to wait before performing another failover attempt.
-
-
-
Method Detail
-
isFailure
boolean isFailure()
Returnstrue
if failure is unrecoverable andfalse
if error is recoverable and failover actions should be performed by the server.- Returns:
true
if failure is unrecoverable andfalse
if error is recoverable and failover actions should be performed by the server.
-
retryDelay
long retryDelay()
Returns the amount of time in milliseconds for server to wait before performing another failover attempt.- Returns:
- Time in milliseconds.
-
retryAddress
InetSocketAddress retryAddress()
Returns a new address that the server should try during its failover actions. Returningnull
instructs the server to reuse the old address (seeNetworkServerFailure.lastTriedAddress()
).- Returns:
- New address that the server should try during its failover actions.
-
withRetryDelay
NetworkServerFailure.Resolution withRetryDelay(long delay)
Sets the amount of time in milliseconds for server to wait before performing another failover attempt.- Parameters:
delay
- Time in milliseconds.- Returns:
- This instance.
-
withRetryAddress
NetworkServerFailure.Resolution withRetryAddress(InetSocketAddress address)
Sets the new address that server should try during its failover actions.- Parameters:
address
- New address ornull
if server should retry the same address.- Returns:
- This instance.
-
-