Package io.hekate.cluster
Class ClusterRejectedJoinException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.hekate.core.HekateException
-
- io.hekate.cluster.ClusterException
-
- io.hekate.cluster.ClusterRejectedJoinException
-
- All Implemented Interfaces:
Serializable
public class ClusterRejectedJoinException extends ClusterException
Signals that the joining node has been rejected byClusterAcceptor
.- See Also:
ClusterAcceptor
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClusterRejectedJoinException(String rejectReason, ClusterAddress rejectedBy)
Constructs new instance with the specified reject reason and address of the node that rejected this node joining.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HekateException
forkFromAsync()
Forks this exception by creating a new exception that has this instance as its cause.ClusterAddress
rejectedBy()
Returns address of the node that rejected this node joining.String
rejectReason()
Returns reject reason as it was returned byClusterAcceptor.acceptJoin(ClusterNode, Hekate)
.-
Methods inherited from class io.hekate.core.HekateException
findCause, isCausedBy
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ClusterRejectedJoinException
public ClusterRejectedJoinException(String rejectReason, ClusterAddress rejectedBy)
Constructs new instance with the specified reject reason and address of the node that rejected this node joining.- Parameters:
rejectReason
- Reject reason as it was returned byClusterAcceptor.acceptJoin(ClusterNode, Hekate)
.rejectedBy
- Address of the node that rejected this node joining.
-
-
Method Detail
-
rejectReason
public String rejectReason()
Returns reject reason as it was returned byClusterAcceptor.acceptJoin(ClusterNode, Hekate)
.- Returns:
- Reject reason.
-
rejectedBy
public ClusterAddress rejectedBy()
Returns address of the node that rejected this node joining.- Returns:
- Address of the node that rejected this node joining.
-
forkFromAsync
public HekateException forkFromAsync()
Description copied from class:HekateException
Forks this exception by creating a new exception that has this instance as its cause.The primary use case of this method is to re-throw exceptions from asynchronous contexts (f.e. exceptions thrown by
Future.get()
method).- Overrides:
forkFromAsync
in classClusterException
- Returns:
- Fork of this exception.
-
-