Class InfinispanMapping
java.lang.Object
org.hibernate.search.mapper.pojo.mapping.spi.AbstractPojoMappingImplementor<SearchMapping>
org.infinispan.search.mapper.mapping.impl.InfinispanMapping
- All Implemented Interfaces:
AutoCloseable
,org.hibernate.search.engine.backend.common.spi.EntityReferenceFactory<EntityReference>
,org.hibernate.search.engine.backend.mapping.spi.BackendMappingContext
,org.hibernate.search.engine.mapper.mapping.spi.MappingImplementor<SearchMapping>
,org.hibernate.search.mapper.pojo.bridge.runtime.spi.BridgeMappingContext
,org.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexingMappingContext
,org.hibernate.search.mapper.pojo.scope.spi.PojoScopeMappingContext
,org.hibernate.search.mapper.pojo.session.spi.PojoSearchSessionMappingContext
,org.hibernate.search.mapper.pojo.work.spi.PojoWorkMappingContext
,SearchMapping
,InfinispanSearchSessionMappingContext
public class InfinispanMapping
extends org.hibernate.search.mapper.pojo.mapping.spi.AbstractPojoMappingImplementor<SearchMapping>
implements SearchMapping, InfinispanSearchSessionMappingContext, org.hibernate.search.engine.backend.common.spi.EntityReferenceFactory<EntityReference>
-
Method Summary
Modifier and TypeMethodDescriptionCollection
<? extends SearchIndexedEntity> void
close()
createEntityReference
(String typeName, Object identifier) org.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexerAgent
createMassIndexerAgent
(org.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexerAgentCreateContext context) <E> SearchScopeImpl
<E> createScope
(Class<E> expectedSuperType, Collection<String> entityNames) <E> SearchScopeImpl
<E> createScope
(Collection<? extends Class<? extends E>> classes) org.hibernate.search.engine.backend.common.spi.EntityReferenceFactory
<EntityReference> org.hibernate.search.engine.reporting.FailureHandler
Optional
<SearchScope<?>> org.hibernate.search.engine.reporting.FailureHandler
org.hibernate.search.engine.common.spi.SearchIntegration
indexedEntity
(Class<?> entityType) indexedEntity
(String entityName) boolean
isClose()
<E> SearchScope
<E> scope
(Collection<? extends Class<? extends E>> targetedTypes) Create aSearchScope
limited to the given types.SearchScope
<?> scopeAll()
void
setIntegration
(org.hibernate.search.engine.common.spi.SearchIntegration integration) org.hibernate.search.engine.environment.thread.spi.ThreadPoolProvider
Class
<?> toConvertedEntityJavaClass
(Object value) Methods inherited from class org.hibernate.search.mapper.pojo.mapping.spi.AbstractPojoMappingImplementor
createIndexer, createIndexingPlan, createIndexingPlan, createIndexingQueueEventProcessingPlan, delegate, doStop, identifierBridgeToDocumentIdentifierContext, preStop, start, stop, toDocumentValueConvertContext, valueBridgeToIndexedValueContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.search.engine.backend.mapping.spi.BackendMappingContext
toDocumentValueConvertContext
Methods inherited from interface org.hibernate.search.mapper.pojo.bridge.runtime.spi.BridgeMappingContext
identifierBridgeToDocumentIdentifierContext, valueBridgeToIndexedValueContext
Methods inherited from interface org.hibernate.search.mapper.pojo.session.spi.PojoSearchSessionMappingContext
createIndexer, createIndexingPlan, createIndexingPlan, createIndexingQueueEventProcessingPlan
Methods inherited from interface org.infinispan.search.mapper.mapping.SearchMapping
indexedEntitiesForStatistics, isRestarting, reload, restart, scope
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSearchMapping
-
isClose
public boolean isClose()- Specified by:
isClose
in interfaceSearchMapping
-
scope
Description copied from interface:SearchMapping
Create aSearchScope
limited to the given types.- Specified by:
scope
in interfaceSearchMapping
- Type Parameters:
E
- An entity to include in the scope.- Parameters:
targetedTypes
- A collection of types to include in the scope.- Returns:
- The created scope.
- See Also:
-
findScopeAll
- Specified by:
findScopeAll
in interfaceSearchMapping
-
scopeAll
- Specified by:
scopeAll
in interfaceSearchMapping
-
getMappingSession
- Specified by:
getMappingSession
in interfaceSearchMapping
-
getSearchIndexer
- Specified by:
getSearchIndexer
in interfaceSearchMapping
-
indexedEntity
- Specified by:
indexedEntity
in interfaceSearchMapping
- Parameters:
entityType
- The type of an possible-indexed entity.- Returns:
- A
SearchIndexedEntity
for the indexed entity with the exact given type, if the type matches some indexed entity, otherwisenull
.
-
indexedEntity
- Specified by:
indexedEntity
in interfaceSearchMapping
-
allIndexedEntities
- Specified by:
allIndexedEntities
in interfaceSearchMapping
- Returns:
- A collection containing one
SearchIndexedEntity
for each indexed entity
-
allIndexedEntityNames
- Specified by:
allIndexedEntityNames
in interfaceSearchMapping
- Returns:
- A set containing the name of
all indexed entities
.
-
allIndexedEntityJavaClasses
- Specified by:
allIndexedEntityJavaClasses
in interfaceSearchMapping
-
toConvertedEntityJavaClass
- Specified by:
toConvertedEntityJavaClass
in interfaceSearchMapping
- Parameters:
value
- An entity.- Returns:
- The internal Java class for this entity after conversion,
i.e. the Java class that will be returned by
SearchMapping.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:
-
metamodel
- Specified by:
metamodel
in interfaceSearchMapping
-
getFailureHandler
public org.hibernate.search.engine.reporting.FailureHandler getFailureHandler()- Specified by:
getFailureHandler
in interfaceSearchMapping
-
createScope
- Specified by:
createScope
in interfaceInfinispanSearchSessionMappingContext
-
createScope
public <E> SearchScopeImpl<E> createScope(Class<E> expectedSuperType, Collection<String> entityNames) - Specified by:
createScope
in interfaceInfinispanSearchSessionMappingContext
-
toConcreteType
- Specified by:
toConcreteType
in interfaceorg.hibernate.search.engine.mapper.mapping.spi.MappingImplementor<SearchMapping>
-
entityReferenceFactory
public org.hibernate.search.engine.backend.common.spi.EntityReferenceFactory<EntityReference> entityReferenceFactory()- Specified by:
entityReferenceFactory
in interfaceorg.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexingMappingContext
- Specified by:
entityReferenceFactory
in interfaceorg.hibernate.search.mapper.pojo.work.spi.PojoWorkMappingContext
-
threadPoolProvider
public org.hibernate.search.engine.environment.thread.spi.ThreadPoolProvider threadPoolProvider()- Specified by:
threadPoolProvider
in interfaceorg.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexingMappingContext
-
failureHandler
public org.hibernate.search.engine.reporting.FailureHandler failureHandler()- Specified by:
failureHandler
in interfaceorg.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexingMappingContext
-
createMassIndexerAgent
public org.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexerAgent createMassIndexerAgent(org.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexerAgentCreateContext context) - Specified by:
createMassIndexerAgent
in interfaceorg.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexingMappingContext
-
createEntityReference
- Specified by:
createEntityReference
in interfaceorg.hibernate.search.engine.backend.common.spi.EntityReferenceFactory<EntityReference>
-
getIntegration
public org.hibernate.search.engine.common.spi.SearchIntegration getIntegration() -
setIntegration
public void setIntegration(org.hibernate.search.engine.common.spi.SearchIntegration integration)
-