Class PulsarClientException

    • Constructor Detail

      • PulsarClientException

        public PulsarClientException​(java.lang.String msg)
        Constructs an PulsarClientException with the specified detail message.
        Parameters:
        msg - The detail message (which is saved for later retrieval by the Throwable.getMessage() method)
      • PulsarClientException

        public PulsarClientException​(java.lang.String msg,
                                     long sequenceId)
        Constructs an PulsarClientException with the specified detail message.
        Parameters:
        msg - The detail message (which is saved for later retrieval by the Throwable.getMessage() method)
        sequenceId - The sequenceId of the message
      • PulsarClientException

        public PulsarClientException​(java.lang.Throwable t)
        Constructs an PulsarClientException with the specified cause.
        Parameters:
        t - The cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
      • PulsarClientException

        public PulsarClientException​(java.lang.String msg,
                                     java.lang.Throwable t)
        Constructs an PulsarClientException with the specified cause.
        Parameters:
        msg - The detail message (which is saved for later retrieval by the Throwable.getMessage() method)
        t - The cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
      • PulsarClientException

        public PulsarClientException​(java.lang.Throwable t,
                                     long sequenceId)
        Constructs an PulsarClientException with the specified cause.
        Parameters:
        t - The cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
        sequenceId - The sequenceId of the message
    • Method Detail

      • setPreviousExceptions

        public void setPreviousExceptions​(java.util.Collection<java.lang.Throwable> previous)
        Add a list of previous exception which occurred for the same operation and have been retried.
        Parameters:
        previous - A collection of throwables that triggered retries
      • getPreviousExceptions

        public java.util.Collection<java.lang.Throwable> getPreviousExceptions()
        Get the collection of previous exceptions which have caused retries for this operation.
        Returns:
        a collection of exception, ordered as they occurred
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Throwable
      • wrap

        public static java.lang.Throwable wrap​(java.lang.Throwable t,
                                               java.lang.String msg)
      • getPreviousExceptions

        public static java.util.Collection<java.lang.Throwable> getPreviousExceptions​(java.lang.Throwable t)
      • setPreviousExceptions

        public static void setPreviousExceptions​(java.lang.Throwable t,
                                                 java.util.Collection<java.lang.Throwable> previous)
      • getSequenceId

        public long getSequenceId()
      • setSequenceId

        public void setSequenceId​(long sequenceId)
      • isRetriableError

        public static boolean isRetriableError​(java.lang.Throwable t)