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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<? extends SearchIndexedEntity>
allIndexedEntities()
Set<Class<?>>
allIndexedEntityJavaClasses()
Set<String>
allIndexedEntityNames()
void
close()
EntityReference
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>
entityReferenceFactory()
org.hibernate.search.engine.reporting.FailureHandler
failureHandler()
org.hibernate.search.engine.reporting.FailureHandler
getFailureHandler()
org.hibernate.search.engine.common.spi.SearchIntegration
getIntegration()
SearchSession
getMappingSession()
SearchIndexer
getSearchIndexer()
SearchIndexedEntity
indexedEntity(Class<?> entityType)
SearchIndexedEntity
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
threadPoolProvider()
SearchMapping
toConcreteType()
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
isRestarting, reload, restart, scope
-
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSearchMapping
-
isClose
public boolean isClose()
- Specified by:
isClose
in interfaceSearchMapping
-
scope
public <E> SearchScope<E> scope(Collection<? extends Class<? extends E>> targetedTypes)
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:
SearchScope
-
scopeAll
public SearchScope<?> scopeAll()
- Specified by:
scopeAll
in interfaceSearchMapping
-
getMappingSession
public SearchSession getMappingSession()
- Specified by:
getMappingSession
in interfaceSearchMapping
-
getSearchIndexer
public SearchIndexer getSearchIndexer()
- Specified by:
getSearchIndexer
in interfaceSearchMapping
-
indexedEntity
public SearchIndexedEntity indexedEntity(Class<?> entityType)
- 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
public SearchIndexedEntity indexedEntity(String entityName)
- Specified by:
indexedEntity
in interfaceSearchMapping
-
allIndexedEntities
public Collection<? extends SearchIndexedEntity> allIndexedEntities()
- Specified by:
allIndexedEntities
in interfaceSearchMapping
- Returns:
- A collection containing one
SearchIndexedEntity
for each indexed entity
-
allIndexedEntityNames
public Set<String> allIndexedEntityNames()
- Specified by:
allIndexedEntityNames
in interfaceSearchMapping
- Returns:
- A set containing the name of
all indexed entities
.
-
allIndexedEntityJavaClasses
public Set<Class<?>> allIndexedEntityJavaClasses()
- Specified by:
allIndexedEntityJavaClasses
in interfaceSearchMapping
-
toConvertedEntityJavaClass
public Class<?> toConvertedEntityJavaClass(Object value)
- 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:
EntityConverter
-
getFailureHandler
public org.hibernate.search.engine.reporting.FailureHandler getFailureHandler()
- Specified by:
getFailureHandler
in interfaceSearchMapping
-
createScope
public <E> SearchScopeImpl<E> createScope(Collection<? extends Class<? extends E>> classes)
- Specified by:
createScope
in interfaceInfinispanSearchSessionMappingContext
-
createScope
public <E> SearchScopeImpl<E> createScope(Class<E> expectedSuperType, Collection<String> entityNames)
- Specified by:
createScope
in interfaceInfinispanSearchSessionMappingContext
-
toConcreteType
public SearchMapping 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
public EntityReference createEntityReference(String typeName, Object identifier)
- 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)
-
-