Interface SearchMapping

All Superinterfaces:
All Known Implementing Classes:

public interface SearchMapping extends AutoCloseable
  • Method Details

    • scope

      default <E> SearchScope<E> scope(Class<E> type)
      Create a SearchScope limited to the given type.
      Type Parameters:
      E - An entity type to include in the scope.
      type - A type to include in the scope.
      The created scope.
      See Also:
    • scope

      <E> SearchScope<E> scope(Collection<? extends Class<? extends E>> types)
      Create a SearchScope limited to the given types.
      Type Parameters:
      E - An entity to include in the scope.
      types - A collection of types to include in the scope.
      The created scope.
      See Also:
    • scopeAll

      SearchScope<?> scopeAll()
    • getFailureHandler getFailureHandler()
    • close

      void close()
      Specified by:
      close in interface AutoCloseable
    • isClose

      boolean isClose()
    • isRestarting

      default boolean isRestarting()
    • getMappingSession

      SearchSession getMappingSession()
    • getSearchIndexer

      SearchIndexer getSearchIndexer()
    • indexedEntity

      SearchIndexedEntity indexedEntity(Class<?> entityType)
      entityType - The type of an possible-indexed entity.
      A SearchIndexedEntity for the indexed entity with the exact given type, if the type matches some indexed entity, otherwise null.
    • indexedEntity

      SearchIndexedEntity indexedEntity(String entityName)
    • allIndexedEntities

      Collection<? extends SearchIndexedEntity> allIndexedEntities()
      A collection containing one SearchIndexedEntity for each indexed entity
    • indexedEntitiesForStatistics

      default Collection<? extends SearchIndexedEntity> indexedEntitiesForStatistics()
    • allIndexedEntityNames

      Set<String> allIndexedEntityNames()
      A set containing the name of all indexed entities.
    • allIndexedEntityJavaClasses

      Set<Class<?>> allIndexedEntityJavaClasses()
    • reload

      default void reload()
      Releases all used resources (IO, threads) and restarts from the mapping configuration.
    • restart

      default void restart()
      Releases some used resources (e.g.: threads), preserving some others (e.g.: IO) and restarts from the mapping configuration.
    • toConvertedEntityJavaClass

      Class<?> toConvertedEntityJavaClass(Object value)
      value - An entity.
      The internal Java class for this entity after conversion, i.e. the Java class that will be returned by allIndexedEntityJavaClasses() if this entity is potentially indexed. In practice, this is only useful to handle protobuf type: if an instance of ProtobufValueWrapper is passed, this will return byte[] because that's the type we use for protobuf values internally. For all other types, this just returns value.getClass().
      See Also:
    • builder

      static SearchMappingBuilder builder( introspector, ClassLoader aggregatedClassLoader, Collection<ProgrammaticSearchMappingProvider> mappingProviders, BlockingManager blockingManager, NonBlockingManager nonBlockingManager)
    • metamodel

      Map<String,IndexMetamodel> metamodel()