code: private Void indexUpdate(Collection<Consumer<Void>> state, Consumer<Void> indexAction) {
          if (async) {
              state.add(indexAction);
          } else {
              indexAction.accept(null);
          }
          return null;
      }
docs: in async mode add the index action to a collection for consumption in {@link #afterCommit(TransactionData, Collection)}, in sync mode, run it directly