src/main/java/com/amazonaws/services/simpleworkflow/flow/aspectj/ExponentialRetryAspect.java [55:92]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @SuppressWarnings({ "rawtypes", "unchecked" })
    private final class DecoratorInvocationHandler implements AsyncRunnable {

        private final ProceedingJoinPoint pjp;

        private final Settable result;

        private AtomicLong firstAttemptTime;

        public DecoratorInvocationHandler(ProceedingJoinPoint pjp, AtomicLong firstAttemptTime, Settable result) {
            this.pjp = pjp;
            this.firstAttemptTime = firstAttemptTime;
            this.result = result;
        }

        @Override
        public void run() throws Throwable {
            List<Promise> waitFors = new ArrayList<>();
            if (pjp.getArgs() != null) {
                for (Object arg : pjp.getArgs()) {
                    if (arg instanceof Promise) {
                        waitFors.add((Promise) arg);
                    }
                    if (arg instanceof Promise[]) {
                        waitFors.addAll(Arrays.asList((Promise[]) arg));
                    }
                }
            }
            AndPromise waitFor = new AndPromise(waitFors);
            new Task(waitFor) {
                @Override
                protected void doExecute() throws Throwable {
                    firstAttemptTime.compareAndSet(0, decisionContextProviderImpl.getDecisionContext().getWorkflowClock().currentTimeMillis());
                }
            };
            if (result != null) {
                result.unchain();
                result.chain((Promise) pjp.proceed());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/com/amazonaws/services/simpleworkflow/flow/aspectj/ExponentialRetryWithJitterAspect.java [50:87]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @SuppressWarnings({ "rawtypes", "unchecked" })
    private final class DecoratorInvocationHandler implements AsyncRunnable {

        private final ProceedingJoinPoint pjp;

        private final Settable result;

        private AtomicLong firstAttemptTime;

        public DecoratorInvocationHandler(ProceedingJoinPoint pjp, AtomicLong firstAttemptTime, Settable result) {
            this.pjp = pjp;
            this.firstAttemptTime = firstAttemptTime;
            this.result = result;
        }

        @Override
        public void run() throws Throwable {
            List<Promise> waitFors = new ArrayList<>();
            if (pjp.getArgs() != null) {
                for (Object arg : pjp.getArgs()) {
                    if (arg instanceof Promise) {
                        waitFors.add((Promise) arg);
                    }
                    if (arg instanceof Promise[]) {
                        waitFors.addAll(Arrays.asList((Promise[]) arg));
                    }
                }
            }
            AndPromise waitFor = new AndPromise(waitFors);
            new Task(waitFor) {
                @Override
                protected void doExecute() throws Throwable {
                    firstAttemptTime.compareAndSet(0, decisionContextProviderImpl.getDecisionContext().getWorkflowClock().currentTimeMillis());
                }
            };
            if (result != null) {
                result.unchain();
                result.chain((Promise) pjp.proceed());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



