All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.search.engine.common.impl.BackendBuildContextImpl Maven / Gradle / Ivy

There is a newer version: 8.0.0.Alpha1
Show newest version
/*
 * Hibernate Search, full-text search for your domain model
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.search.engine.common.impl;

import java.util.Optional;

import org.hibernate.search.engine.backend.spi.BackendBuildContext;
import org.hibernate.search.engine.tenancy.spi.TenancyMode;

class BackendBuildContextImpl extends DelegatingBuildContext implements BackendBuildContext {

	private final TenancyMode tenancyMode;

	private final Optional backendNameOptional;

	BackendBuildContextImpl(RootBuildContext delegate, TenancyMode tenancyMode, Optional backendNameOptional) {
		super( delegate );
		this.tenancyMode = tenancyMode;
		this.backendNameOptional = backendNameOptional;
	}

	@Override
	public boolean multiTenancyEnabled() {
		return TenancyMode.MULTI_TENANCY.equals( tenancyMode );
	}

	@Override
	public Optional backendName() {
		return backendNameOptional;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy