Class DuplicateResultException

  • All Implemented Interfaces:
    java.io.Serializable

    public class DuplicateResultException
    extends java.lang.RuntimeException
    Exception indicating that the result of a future was set twice.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      DuplicateResultException​(int type, IFuture<?> future, java.lang.Object first, java.lang.Object second)
      Create a duplicate result exception.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      IFuture<?> getFuture()
      Get the future.
      void printStackTrace()
      Prints also stack trace of first exception, if available.
      java.lang.String toString()
      Get a string representation.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • TYPE_RESULT_RESULT

        public static final int TYPE_RESULT_RESULT
        Two results.
        See Also:
        Constant Field Values
      • TYPE_RESULT_EXCEPTION

        public static final int TYPE_RESULT_EXCEPTION
        First result then exception.
        See Also:
        Constant Field Values
      • TYPE_EXCEPTION_RESULT

        public static final int TYPE_EXCEPTION_RESULT
        First exception then result.
        See Also:
        Constant Field Values
      • TYPE_EXCEPTION_EXCEPTION

        public static final int TYPE_EXCEPTION_EXCEPTION
        Two exceptions.
        See Also:
        Constant Field Values
      • type

        protected int type
        The type.
      • future

        protected IFuture<?> future
        The future.
      • first

        protected java.lang.Object first
        The first result.
      • second

        protected java.lang.Object second
        The second result.
    • Constructor Detail

      • DuplicateResultException

        public DuplicateResultException​(int type,
                                        IFuture<?> future,
                                        java.lang.Object first,
                                        java.lang.Object second)
        Create a duplicate result exception.
    • Method Detail

      • getFuture

        public IFuture<?> getFuture()
        Get the future.
      • toString

        public java.lang.String toString()
        Get a string representation.
        Overrides:
        toString in class java.lang.Throwable
      • printStackTrace

        public void printStackTrace()
        Prints also stack trace of first exception, if available.
        Overrides:
        printStackTrace in class java.lang.Throwable