Interface Mapper<MPBS extends MappingPartialBuildState>
- Type Parameters:
MPBS
- The Java type of the partial build state of the produced mapping.
public interface Mapper<MPBS extends MappingPartialBuildState>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Close any allocated resource.void
mapTypes
(MappedIndexManagerFactory indexManagerFactory) Begin the creation of a mapping for all mapped types.Partially build the mapping based on theindexed types
added so far.void
prepareMappedTypes
(BackendsInfo backendsInfo) Prepare for the mapping of types and inform the engine of the names of all backends this mapper depends on.
-
Method Details
-
closeOnFailure
void closeOnFailure()Close any allocated resource.This method is called when an error occurs while starting up Hibernate Search. When this method is called, it is guaranteed to be the last call on the mapper.
-
prepareMappedTypes
Prepare for the mapping of types and inform the engine of the names of all backends this mapper depends on.Called exactly once just before
mapTypes(MappedIndexManagerFactory)
.- Parameters:
backendsInfo
- A collector of backend names and other info.
-
mapTypes
Begin the creation of a mapping for all mapped types.Called exactly once just after
prepareMappedTypes(BackendsInfo)
and beforeprepareBuild()
.- Parameters:
indexManagerFactory
- A factory for index managers, supporting all the backends declared inprepareMappedTypes(BackendsInfo)
.
-
prepareBuild
Partially build the mapping based on theindexed types
added so far.Called exactly once just after
mapTypes(MappedIndexManagerFactory)
.- Returns:
- The partially-built mapping.
- Throws:
MappingAbortedException
- When aborting the mapping due tocollected
failures.
-