Class TerminatedQueueException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.jtrim2.concurrent.collections.TerminatedQueueException
All Implemented Interfaces:
Serializable

public class TerminatedQueueException extends Exception
Thrown if a queue was shut down, and still trying to add or remove element.
See Also:
  • Constructor Details

    • TerminatedQueueException

      public TerminatedQueueException(Throwable cause)
      Creates the exception with a specific cause. The detail message will be the string returned by the cause.toString() call.
      Parameters:
      cause - the causing exception of the TerminatedQueueException. The cause of TerminatedQueueException should usually be null but it is possible to specify the cause to preserve the stack trace of other exceptions signaling termination. This argument can be null if there is no cause.
    • TerminatedQueueException

      public TerminatedQueueException(String message, Throwable cause)
      Creates the exception with a specific detail message and cause.
      Parameters:
      message - the message to be returned by getMessage(). This argument can be null.
      cause - the causing exception of the TerminatedQueueException. The cause of TerminatedQueueException should usually be null but it is possible to specify the cause to preserve the stack trace of other exceptions signaling termination. This argument can be null if there is no cause.
    • TerminatedQueueException

      public TerminatedQueueException(String message)
      Creates the exception with a specific detail message.
      Parameters:
      message - the message to be returned by getMessage(). This argument can be null.
    • TerminatedQueueException

      public TerminatedQueueException()
      Creates the exception with null as its detail message.
    • TerminatedQueueException

      protected TerminatedQueueException(String message, Throwable cause, boolean writableStackTrace)
      Constructs a new exception with the specified detail message, cause, and writable stack trace enabled or disabled.
      Parameters:
      message - the detail message.
      cause - the cause. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
      writableStackTrace - whether or not the stack trace should be writable
  • Method Details

    • withoutStackTrace

      public static TerminatedQueueException withoutStackTrace()
      Returns a new instance of TerminatedQueueException without stack trace information. The stack trace cannot be set later.
      Returns:
      a new instance of TerminatedQueueException without stack trace information. This method never returns null.
    • withoutStackTrace

      public static TerminatedQueueException withoutStackTrace(String message, Throwable cause)
      Returns a new instance of TerminatedQueueException without stack trace information. The stack trace cannot be set later.
      Parameters:
      message - the message to be returned by getMessage(). This argument can be null.
      cause - cause 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.)
      Returns:
      a new instance of TerminatedQueueException without stack trace information. This method never returns null.