Class DetachedBackendSessionContext
- java.lang.Object
-
- org.hibernate.search.engine.backend.session.spi.DetachedBackendSessionContext
-
public final class DetachedBackendSessionContext extends Object
Provides visibility from the lower layers of Hibernate Search (engine, backend) to the session defined in the upper layers (mapping).On contrary to
BackendSessionContext, this context is expected to be detached from the actual session, allowing it to be used after the session was closed. The main downside is that this context cannot be used everywhereBackendSessionContextcan. In particular, it cannot be used when creating document-relatedindexing plansorindexersbecause these may need access to the session.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BackendMappingContextmappingContext()static DetachedBackendSessionContextof(BackendMappingContext mappingContext, String tenantIdentifier)static DetachedBackendSessionContextof(BackendSessionContext sessionContext)StringtenantIdentifier()
-
-
-
Method Detail
-
of
public static DetachedBackendSessionContext of(BackendSessionContext sessionContext)
-
of
public static DetachedBackendSessionContext of(BackendMappingContext mappingContext, String tenantIdentifier)
-
mappingContext
public BackendMappingContext mappingContext()
-
tenantIdentifier
public String tenantIdentifier()
-
-