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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
closeOnFailure()
Close any allocated resource.void
mapIndexedTypes(MappedIndexManagerFactory indexManagerFactory)
Begin the creation of a mapping for all indexed types.MPBS
prepareBuild()
Partially build the mapping based on theindexed types
added so far.void
prepareIndexedTypes(BackendsInfo backendsInfo)
Prepare for the mapping of indexed types and inform the engine of the names of all backends this mapper depends on.
-
-
-
Method Detail
-
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.
-
prepareIndexedTypes
void prepareIndexedTypes(BackendsInfo backendsInfo)
Prepare for the mapping of indexed types and inform the engine of the names of all backends this mapper depends on.Called exactly once just before
mapIndexedTypes(MappedIndexManagerFactory)
.- Parameters:
backendsInfo
- A collector of backend names and other info.
-
mapIndexedTypes
void mapIndexedTypes(MappedIndexManagerFactory indexManagerFactory)
Begin the creation of a mapping for all indexed types.Called exactly once just after
prepareIndexedTypes(BackendsInfo)
and beforeprepareBuild()
.- Parameters:
indexManagerFactory
- A factory for index managers, supporting all the backends declared inprepareIndexedTypes(BackendsInfo)
.
-
prepareBuild
MPBS prepareBuild() throws MappingAbortedException
Partially build the mapping based on theindexed types
added so far.Called exactly once just after
mapIndexedTypes(MappedIndexManagerFactory)
.- Returns:
- The partially-built mapping.
- Throws:
MappingAbortedException
- When aborting the mapping due tocollected
failures.
-
-