Class RaftException

    • Constructor Detail

      • RaftException

        public RaftException​(Throwable cause)
        Creates an instance of this exception
        Parameters:
        cause - reason of this exception to be thrown
      • RaftException

        public RaftException​(RaftEndpoint leader)
        Creates an instance of this exception
        Parameters:
        leader - Raft endpoint of the leader known by the local Raft node
      • RaftException

        public RaftException​(String message,
                             RaftEndpoint leader)
        Creates an instance of this exception
        Parameters:
        message - exception message
        leader - Raft endpoint of the leader known by the local Raft node
      • RaftException

        public RaftException​(String message,
                             RaftEndpoint leader,
                             Throwable cause)
        Creates an instance of this exception
        Parameters:
        message - exception message
        leader - Raft endpoint of the leader known by the local Raft node
        cause - reason of this exception to be thrown
    • Method Detail

      • getLeader

        public RaftEndpoint getLeader()
        Returns the leader endpoint of the related Raft group, if available and known by the Raft node by the time this exception is thrown.
        Returns:
        the leader endpoint of the related Raft group, if available and known by the Raft node by the time this exception is thrown