Class TenancyConfiguration
java.lang.Object
org.hibernate.search.mapper.orm.tenancy.spi.TenancyConfiguration
- All Implemented Interfaces:
AutoCloseable
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static TenancyConfigurationcreate(org.hibernate.search.engine.environment.bean.BeanResolver beanResolver, org.hibernate.search.engine.tenancy.spi.TenancyMode tenancyMode, org.hibernate.search.engine.cfg.ConfigurationPropertySource configurationPropertySource) static TenancyConfigurationcreate(org.hibernate.search.engine.tenancy.spi.TenancyMode tenancyMode, org.hibernate.search.engine.environment.bean.BeanHolder<? extends org.hibernate.search.mapper.pojo.tenancy.TenantIdentifierConverter> tenantIdentifierConverter, Optional<Set<String>> tenantIds, String tenantIdsConfigurationPropertyKey) org.hibernate.search.util.common.SearchExceptioninvalidTenantId(String tenantId) org.hibernate.search.engine.tenancy.spi.TenancyMode
-
Method Details
-
create
public static TenancyConfiguration create(org.hibernate.search.engine.environment.bean.BeanResolver beanResolver, org.hibernate.search.engine.tenancy.spi.TenancyMode tenancyMode, org.hibernate.search.engine.cfg.ConfigurationPropertySource configurationPropertySource) -
create
public static TenancyConfiguration create(org.hibernate.search.engine.tenancy.spi.TenancyMode tenancyMode, org.hibernate.search.engine.environment.bean.BeanHolder<? extends org.hibernate.search.mapper.pojo.tenancy.TenantIdentifierConverter> tenantIdentifierConverter, Optional<Set<String>> tenantIds, String tenantIdsConfigurationPropertyKey) -
tenantIdsOrFail
- Returns:
- A set of all possible tenant IDs, or an empty set if the application is single-tenant.
- Throws:
org.hibernate.search.util.common.SearchException- if the application is multi-tenant and the full list of tenant IDs was not configured.
-
invalidTenantId
-
convert
-
convert
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
tenancyMode
public org.hibernate.search.engine.tenancy.spi.TenancyMode tenancyMode()
-