Package io.hekate.messaging.retry
Interface Attempt
-
- All Known Subinterfaces:
FailedAttempt
public interface Attempt
Attempt.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Set<ClusterNode>
allTriedNodes()
Returns an immutable set of all tried nodes.int
attempt()
Returns the current attempts (starting with zero for the first attempt).default boolean
hasTriedNode(ClusterNode node)
Returnstrue
if the specified node is in theallTriedNodes()
set.default boolean
isFirstAttempt()
Returnstrue
if this is the first attempt (attempt()
== 0).ClusterNode
lastTriedNode()
Returns the last tried node.
-
-
-
Method Detail
-
attempt
int attempt()
Returns the current attempts (starting with zero for the first attempt).- Returns:
- Attempts count.
-
lastTriedNode
ClusterNode lastTriedNode()
Returns the last tried node.- Returns:
- Last tried node.
-
allTriedNodes
Set<ClusterNode> allTriedNodes()
Returns an immutable set of all tried nodes.- Returns:
- Immutable set of all tried nodes.
-
hasTriedNode
default boolean hasTriedNode(ClusterNode node)
Returnstrue
if the specified node is in theallTriedNodes()
set.- Parameters:
node
- Node to check.- Returns:
true
if the specified node is in theallTriedNodes()
set.
-
isFirstAttempt
default boolean isFirstAttempt()
Returnstrue
if this is the first attempt (attempt()
== 0).- Returns:
true
if this is the first attempt.
-
-