com.hazelcast.cp.exception

## Class CPSubsystemException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - com.hazelcast.core.HazelcastException
        - - com.hazelcast.cp.exception.CPSubsystemException

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    CannotReplicateException, CPGroupDestroyedException, LeaderDemotedException, NotLeaderException, StaleAppendRequestException

      public class CPSubsystemException
      extends HazelcastException

  Base exception for failures in the CP subsystem

  This exception can include the known leader of a `CPGroup` when it's thrown. Leader endpoint can be accessed by `getLeader()`, if available.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CPSubsystemException(Endpoint leader)`
    `CPSubsystemException(String message, Endpoint leader)`
    `CPSubsystemException(String message, Endpoint leader, Throwable cause)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Endpoint` | `getLeader()` Returns the leader endpoint of related CP group, if known/available by the time this exception is thrown.

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CPSubsystemException

          public CPSubsystemException(Endpoint leader)

    - #### CPSubsystemException

          public CPSubsystemException(String message,
                                      Endpoint leader)

    - #### CPSubsystemException

          public CPSubsystemException(String message,
                                      Endpoint leader,
                                      Throwable cause)

  - ### Method Detail

    - #### getLeader

          public Endpoint getLeader()

      Returns the leader endpoint of related CP group, if known/available by the time this exception is thrown.

Copyright © 2019. All rights reserved.