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 everywhereBackendSessionContext
can. In particular, it cannot be used when creating document-relatedindexing plans
orindexers
because these may need access to the session.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BackendMappingContext
mappingContext()
static DetachedBackendSessionContext
of(BackendMappingContext mappingContext, String tenantIdentifier)
static DetachedBackendSessionContext
of(BackendSessionContext sessionContext)
String
tenantIdentifier()
-
-
-
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()
-
-