@Override public ListenableFuture<Void> abort() { return delegateCohort.abort(); }
@Override public ListenableFuture<Void> abort() { return delegate().abort(); }
@Override public ListenableFuture<Void> abort() { return delegate().abort(); }
/** * Invokes abort on underlying cohorts and returns future which * completes once all abort on cohorts are completed. * * @return Future which will complete once all cohorts completed * abort. */ @SuppressWarnings({"unchecked", "rawtypes"}) private ListenableFuture<Void> abortAsyncAll() { final ListenableFuture<?>[] ops = new ListenableFuture<?>[cohorts.size()]; int i = 0; for (final DOMStoreThreePhaseCommitCohort cohort : cohorts) { ops[i++] = cohort.abort(); } /* * We are returning all futures as list, not only succeeded ones in * order to fail composite future if any of them failed. * See Futures.allAsList for this description. */ return (ListenableFuture) Futures.allAsList(ops); } }
int i = 0; for (DOMStoreThreePhaseCommitCohort cohort : cohorts) { canCommitFutures[i++] = cohort.abort();