docs: public static void addFlushHandler(OperationContext context, ContentRepository contentRepository, OperationContext.ResultHandler handler) {
          if (context.getAttachment(CONTENT_REPOSITORY_FLUSH) == null) {
              context.attach(CONTENT_REPOSITORY_FLUSH, true);
              context.completeStep(new OperationContext.ResultHandler() {
                  @Override
                  public void handleResult(OperationContext.ResultAction resultAction, OperationContext context, ModelNode operation) {
                      handler.handleResult(resultAction, context, operation);
                      contentRepository.flush(resultAction == OperationContext.ResultAction.KEEP);
                      context.detach(CONTENT_REPOSITORY_FLUSH);
                  }
              });
          } else {
              context.completeStep(handler);
          }
      }