Package sonia.scm.search
Interface Indexer<T>
- Type Parameters:
T
- type to index
@Beta
@ExtensionPoint
public interface Indexer<T>
Indexer for a specific type.
Note: An implementation of the indexer creates only a bootstrap index.
To keep the index in sync you have to implement a subscriber, see
HandlerEventIndexSyncer
.- Since:
- 2.22.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Abstract class which builds the foundation for tasks which re-index all items. -
Method Summary
Modifier and TypeMethodDescriptioncreateDeleteTask
(T item) Creates a task which deletes the given item from index.createStoreTask
(T item) Creates a task which stores the given item in the index.Class<? extends Indexer.ReIndexAllTask<T>>
Returns task which re index all items.getType()
Returns class of type.int
Returns version of index type.
-
Method Details
-
getType
Returns class of type. -
getVersion
int getVersion()Returns version of index type. The version should be increased if the type changes and should be re indexed.- Returns:
- current index type version
-
getReIndexAllTask
Class<? extends Indexer.ReIndexAllTask<T>> getReIndexAllTask()Returns task which re index all items.- Since:
- 2.23.0
-
createStoreTask
Creates a task which stores the given item in the index.- Parameters:
item
- item to store- Returns:
- task which stores the item
- Since:
- 2.23.0
-
createDeleteTask
Creates a task which deletes the given item from index.- Parameters:
item
- item to delete- Returns:
- task which deletes the item
- Since:
- 2.23.0
-