public class IndexRepositorySpy
extends org.apache.geode.cache.lucene.internal.IndexRepositoryFactory
| Modifier and Type | Method and Description |
|---|---|
void |
beforeWriteIndexRepository(java.util.function.Consumer<java.lang.Object> action)
Add a callback that runs before a call to
IndexRepository.create(Object, Object),
IndexRepository.update(Object, Object) or IndexRepository.delete(Object) |
org.apache.geode.cache.lucene.internal.repository.IndexRepository |
computeIndexRepository(java.lang.Integer bucketId,
LuceneSerializer serializer,
org.apache.geode.cache.lucene.internal.InternalLuceneIndex index,
org.apache.geode.internal.cache.PartitionedRegion userRegion,
org.apache.geode.cache.lucene.internal.repository.IndexRepository oldRepository,
org.apache.geode.cache.lucene.internal.PartitionedRepositoryManager partitionedRepositoryManager) |
static <T> java.util.function.Consumer<T> |
doAfterN(java.util.function.Consumer<T> consumer,
int times)
Return a consumer that will invoke the passed in consumer only after it has been called exactly
N times.
|
static <T> java.util.function.Consumer<T> |
doOnce(java.util.function.Consumer<T> consumer)
Return a consumer that will invoke the passed in consumer only once
|
static IndexRepositorySpy |
injectSpy() |
static void |
remove() |
public static IndexRepositorySpy injectSpy()
public static void remove()
public org.apache.geode.cache.lucene.internal.repository.IndexRepository computeIndexRepository(java.lang.Integer bucketId,
LuceneSerializer serializer,
org.apache.geode.cache.lucene.internal.InternalLuceneIndex index,
org.apache.geode.internal.cache.PartitionedRegion userRegion,
org.apache.geode.cache.lucene.internal.repository.IndexRepository oldRepository,
org.apache.geode.cache.lucene.internal.PartitionedRepositoryManager partitionedRepositoryManager)
throws java.io.IOException
computeIndexRepository in class org.apache.geode.cache.lucene.internal.IndexRepositoryFactoryjava.io.IOExceptionpublic void beforeWriteIndexRepository(java.util.function.Consumer<java.lang.Object> action)
IndexRepository.create(Object, Object),
IndexRepository.update(Object, Object) or IndexRepository.delete(Object)public static <T> java.util.function.Consumer<T> doOnce(java.util.function.Consumer<T> consumer)
public static <T> java.util.function.Consumer<T> doAfterN(java.util.function.Consumer<T> consumer,
int times)