public interface SharedEntityIndexer
SharedEntity
.Modifier and Type | Method and Description |
---|---|
String |
clear(SharedEntity.TypeDescriptor<?> type)
Clear a particular type's index.
|
default void |
contributeToSnapshot(SharedEntity.TypeDescriptor<? extends SharedEntity> entityType,
BackupBuilder backupBuilder)
Contribute a set of files that represent shared entity index of
entityType to the given backupBuilder to include them in the backup being created when this method was called. |
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) |
Index.Result index(SharedEntity entity)
entity
- the entity to add to the indexIndex.Result deIndex(SharedEntity entity)
entity
- the entity to remove from the indexIndex.Result index(SharedEntity entity, boolean shouldReplicate)
entity
- the entity to add to the indexshouldReplicate
- whether or not the index changes should be replicated to the other nodes in the cluster.Index.Result index(Set<SharedEntity> sharedEntities, boolean shouldReplicate)
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.Index.Result deIndex(Set<SharedEntity> sharedEntities, boolean shouldReplicate)
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.<S extends SharedEntity> SharedEntitySearchResult<S> withSearcher(SharedEntity.TypeDescriptor<S> type, java.util.function.Function<SharedEntitySearcher<S>,SharedEntitySearchResult<S>> searcherOperation)
long optimize(SharedEntity.TypeDescriptor<?> type)
type
- describes the particular indexvoid shutdown(SharedEntity.TypeDescriptor<?> type)
type
- describes the particular indexString clear(SharedEntity.TypeDescriptor<?> type)
type
- describes the particular indexCollection<String> getAllIndexPaths()
void recreate(SharedEntity.TypeDescriptor<?> type)
default void contributeToSnapshot(SharedEntity.TypeDescriptor<? extends SharedEntity> entityType, BackupBuilder backupBuilder)
entityType
to the given backupBuilder
to include them in the backup being created when this method was called.backupBuilder
- temporary(reference should not be stored) builder of backup file. All existing and nonempty files passed to it's accept method will be included in archive being created during the call.entityType
- type of SharedEntity
index to be added to the snapshotCopyright © 2002-2021 Atlassian. All Rights Reserved.