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

org.hibernate.search.mapper.javabean.session.SearchSessionBuilder Maven / Gradle / Ivy

The 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.mapper.javabean.session;

import org.hibernate.search.engine.backend.work.execution.DocumentCommitStrategy;
import org.hibernate.search.engine.backend.work.execution.DocumentRefreshStrategy;

public interface SearchSessionBuilder {

	/**
	 * @param tenantId The tenant ID to use when performing index-related operatiosn (indexing, searching, ...)
	 * in the resulting session.
	 * @return {@code this} for method chaining.
	 */
	SearchSessionBuilder tenantId(String tenantId);

	/**
	 * @param commitStrategy The commit strategy for indexing works added to the {@link SearchSession#indexingPlan() indexing plan}.
	 * @return {@code this} for method chaining.
	 */
	SearchSessionBuilder commitStrategy(DocumentCommitStrategy commitStrategy);

	/**
	 * @param refreshStrategy The refresh strategy for indexing works added to the {@link SearchSession#indexingPlan() indexing plan}.
	 * @return {@code this} for method chaining.
	 */
	SearchSessionBuilder refreshStrategy(DocumentRefreshStrategy refreshStrategy);

	/**
	 * @return The resulting session.
	 */
	SearchSession build();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy