Class CurrentTaskFuture.UpAllTheWay

    • Field Detail

      • lock

        private final java.lang.Object lock
      • goingTo

        private int goingTo
      • maxThreads

        private final int maxThreads
      • useThreads

        private final boolean useThreads
      • cancelTimeout

        private final long cancelTimeout
      • workingOn

        private int workingOn
      • cancelled

        private boolean cancelled
      • done

        private boolean done
      • repurposed

        private boolean repurposed
    • Method Detail

      • cancel

        private void cancel()
      • waitForResult

        public java.lang.Boolean waitForResult​(long timeout,
                                               java.util.concurrent.TimeUnit unit)
                                        throws java.lang.InterruptedException,
                                               MultiException
        Description copied from interface: CurrentTaskFuture.AllTheWay
        The method to call on the internal job
        Specified by:
        waitForResult in interface CurrentTaskFuture.AllTheWay
        Parameters:
        timeout - The amount of time to wait for a result
        unit - The unit of the above time value
        Returns:
        True if the job finished, False if the timeout is up prior to the job finishing, and null if the job was repurposed and the caller may now need to listen on a different job
        Throws:
        java.lang.InterruptedException - On a thread getting jacked
        MultiException - Other exceptions
      • setGoingTo

        private void setGoingTo​(int goingTo,
                                boolean repurposed)
      • go

        private void go()
      • currentJobComplete

        private void currentJobComplete​(MultiException accumulatedExceptions)