Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make query timeout members final in ExitableDirectoryReader #12274

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*/
public class ExitableDirectoryReader extends FilterDirectoryReader {

private QueryTimeout queryTimeout;
private final QueryTimeout queryTimeout;

/** Exception that is thrown to prematurely terminate a term enumeration. */
@SuppressWarnings("serial")
Expand All @@ -50,7 +50,7 @@ public ExitingReaderException(String msg) {

/** Wrapper class for a SubReaderWrapper that is used by the ExitableDirectoryReader. */
public static class ExitableSubReaderWrapper extends SubReaderWrapper {
private QueryTimeout queryTimeout;
private final QueryTimeout queryTimeout;

/** Constructor * */
public ExitableSubReaderWrapper(QueryTimeout queryTimeout) {
Expand Down Expand Up @@ -810,7 +810,7 @@ public static class ExitableTermsEnum extends FilterTermsEnum {
// Create bit mask in the form of 0000 1111 for efficient checking
private static final int NUM_CALLS_PER_TIMEOUT_CHECK = (1 << 4) - 1; // 15
private int calls;
private QueryTimeout queryTimeout;
private final QueryTimeout queryTimeout;

/** Constructor * */
public ExitableTermsEnum(TermsEnum termsEnum, QueryTimeout queryTimeout) {
Expand Down