@Override
      public void accept(final T t) {
        if (!done) {
          done = true;
          consumer.accept(t);
        }
      }
Add a callback that runs before a call to {@link IndexRepository#create(Object, Object)},
{@link IndexRepository#update(Object, Object)} or {@link IndexRepository#delete(Object)}

@param action the callback to run
geode-lucene/geode-lucene-test/src/main/java/org/apache/geode/cache/lucene/test/IndexRepositorySpy.java