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:
  • Method Details

    • getType

      Class<T> 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

      SerializableIndexTask<T> createStoreTask(T item)
      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

      SerializableIndexTask<T> createDeleteTask(T item)
      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