public class MockSharedEntityIndexer extends Object implements SharedEntityIndexer
Constructor and Description |
---|
MockSharedEntityIndexer() |
Modifier and Type | Method and Description |
---|---|
String |
clear(SharedEntity.TypeDescriptor<?> type)
Clear a particular type's index.
|
Index.Result |
deIndex(Set<SharedEntity> sharedEntities,
boolean shouldReplicate)
Delete multiple documents in the index
|
Index.Result |
deIndex(SharedEntity entity)
Delete a document from the index.
|
Collection<String> |
getAllIndexPaths() |
Index.Result |
index(Set<SharedEntity> sharedEntities,
boolean shouldReplicate)
Add or update multiple documents in the index
|
Index.Result |
index(SharedEntity entity)
Add or update a document in the index.
|
Index.Result |
index(SharedEntity entity,
boolean shouldReplicate)
Add or update a document in the index.
|
long |
optimize(SharedEntity.TypeDescriptor<?> type)
Optimize a particular type's index.
|
void |
recreate(SharedEntity.TypeDescriptor<?> type)
Recreate the index.
|
void |
shutdown(SharedEntity.TypeDescriptor<?> type)
Shutdown a particular type's index.
|
<S extends SharedEntity> |
withSearcher(SharedEntity.TypeDescriptor<S> type,
java.util.function.Function<SharedEntitySearcher<S>,SharedEntitySearchResult<S>> searcherOperation) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
contributeToSnapshot
public Index.Result index(SharedEntity entity)
SharedEntityIndexer
index
in interface SharedEntityIndexer
entity
- the entity to add to the indexpublic Index.Result deIndex(SharedEntity entity)
SharedEntityIndexer
deIndex
in interface SharedEntityIndexer
entity
- the entity to remove from the indexpublic Index.Result index(SharedEntity entity, boolean shouldReplicate)
SharedEntityIndexer
index
in interface SharedEntityIndexer
entity
- the entity to add to the indexshouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.public Index.Result index(Set<SharedEntity> sharedEntities, boolean shouldReplicate)
SharedEntityIndexer
index
in interface SharedEntityIndexer
sharedEntities
- a Set of entities to add to the indexshouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.public Index.Result deIndex(Set<SharedEntity> sharedEntities, boolean shouldReplicate)
SharedEntityIndexer
deIndex
in interface SharedEntityIndexer
sharedEntities
- a Set of entities to remove from the indexshouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.public <S extends SharedEntity> SharedEntitySearchResult<S> withSearcher(SharedEntity.TypeDescriptor<S> type, java.util.function.Function<SharedEntitySearcher<S>,SharedEntitySearchResult<S>> searcherOperation)
withSearcher
in interface SharedEntityIndexer
public long optimize(SharedEntity.TypeDescriptor<?> type)
SharedEntityIndexer
optimize
in interface SharedEntityIndexer
type
- describes the particular indexpublic String clear(SharedEntity.TypeDescriptor<?> type)
SharedEntityIndexer
clear
in interface SharedEntityIndexer
type
- describes the particular indexpublic void shutdown(SharedEntity.TypeDescriptor<?> type)
SharedEntityIndexer
shutdown
in interface SharedEntityIndexer
type
- describes the particular indexpublic Collection<String> getAllIndexPaths()
getAllIndexPaths
in interface SharedEntityIndexer
public void recreate(SharedEntity.TypeDescriptor<?> type)
SharedEntityIndexer
recreate
in interface SharedEntityIndexer
Copyright © 2002-2022 Atlassian. All Rights Reserved.