Interface ReconnectStrategy
- All Known Implementing Classes:
FixedIntervalReconnectStrategy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A contract to determine the frequency of reconnect attempts after connection failure.
- Since:
- 4.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptiongetTimeToNextAttempt
(int attemptCount) Return the time to the next attempt to reconnect.
-
Method Details
-
getTimeToNextAttempt
Return the time to the next attempt to reconnect.- Parameters:
attemptCount
- how many reconnect attempts have been made already- Returns:
- the amount of time in milliseconds, or
null
to stop
-