@Override public ChainedListenableFuture<V> then(final Callable<ListenableFuture<V>> r) { return doAfter(_exector, this,r); }
@Override public ChainedListenableFuture<Void> then(final Runnable r) { return doAfter(_exector, this, r); }
@Override public <A> ChainedListenableFuture<A> then(final CallableWithArgument<ListenableFuture<A>,V> r) { return doAfter(_exector, this, r); } }
protected final <V,A> ChainedListenableFuture<V> doAfter(ListenableFuture<A> first, final CallableWithArgument<ListenableFuture<V>,A> second) { return doAfter(getTaskExecutor(), first, second); }
protected final ChainedListenableFuture<Void> doAfter(ListenableFuture<?> first, final Runnable second) { return doAfter(getTaskExecutor(), first, second); }
protected final <V> ChainedListenableFuture<V> doAfter(ListenableFuture<V> first, final Callable<ListenableFuture<V>> second) { return doAfter(getTaskExecutor(), first, second); }
return doAfter(combinedFuture, new Runnable()
@Override public ListenableFuture<C> execute() { authoriseCreateChild(childClass, attributes); return doAfter(addChildAsync(childClass, attributes), new CallableWithArgument<ListenableFuture<C>, C>() { @Override public ListenableFuture<C> call(final C child) throws Exception { if (child != null) { childAdded(child); } return Futures.immediateFuture(child); } }); }
doAfter(beforeClose(), new Callable<ListenableFuture<Void>>()
if(desiredState == currentDesiredState && desiredState != state) return doAfter(attainStateIfOpenedOrReopenFailed(), new Runnable()
doAfter(beforeDelete(), this::deleteChildren).then(this::onDelete) .then(() -> { final State currentState = getState();