Rename manager
This commit is contained in:
parent
5a79d2d7cb
commit
d05994c8ff
@ -17,14 +17,13 @@ import org.apache.lucene.search.similarities.Similarity;
|
||||
import org.apache.lucene.store.AlreadyClosedException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.reactivestreams.Publisher;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.core.publisher.Sinks;
|
||||
import reactor.core.publisher.Sinks.Empty;
|
||||
import reactor.core.scheduler.Schedulers;
|
||||
|
||||
public class PooledIndexSearcherManager {
|
||||
public class CachedIndexSearcherManager {
|
||||
|
||||
private final SnapshotsManager snapshotsManager;
|
||||
private final Similarity similarity;
|
||||
@ -38,7 +37,7 @@ public class PooledIndexSearcherManager {
|
||||
private final Empty<Void> closeRequested = Sinks.empty();
|
||||
private final Empty<Void> refresherClosed = Sinks.empty();
|
||||
|
||||
public PooledIndexSearcherManager(IndexWriter indexWriter,
|
||||
public CachedIndexSearcherManager(IndexWriter indexWriter,
|
||||
SnapshotsManager snapshotsManager,
|
||||
Similarity similarity,
|
||||
boolean applyAllDeletes,
|
||||
@ -69,7 +68,7 @@ public class PooledIndexSearcherManager {
|
||||
.build(new CacheLoader<>() {
|
||||
@Override
|
||||
public Mono<CachedIndexSearcher> load(@NotNull LLSnapshot snapshot) {
|
||||
return PooledIndexSearcherManager.this.generateCachedSearcher(snapshot);
|
||||
return CachedIndexSearcherManager.this.generateCachedSearcher(snapshot);
|
||||
}
|
||||
});
|
||||
this.cachedMainSearcher = this.generateCachedSearcher(null);
|
@ -80,7 +80,7 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
|
||||
private final String luceneIndexName;
|
||||
private final IndexWriter indexWriter;
|
||||
private final SnapshotsManager snapshotsManager;
|
||||
private final PooledIndexSearcherManager searcherManager;
|
||||
private final CachedIndexSearcherManager searcherManager;
|
||||
private final Similarity similarity;
|
||||
private final Directory directory;
|
||||
private final boolean lowMemory;
|
||||
@ -196,7 +196,7 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
|
||||
indexWriterConfig.setSimilarity(getSimilarity());
|
||||
this.indexWriter = new IndexWriter(directory, indexWriterConfig);
|
||||
this.snapshotsManager = new SnapshotsManager(indexWriter, snapshotter, scheduledTasksLifecycle);
|
||||
this.searcherManager = new PooledIndexSearcherManager(indexWriter,
|
||||
this.searcherManager = new CachedIndexSearcherManager(indexWriter,
|
||||
snapshotsManager,
|
||||
getSimilarity(),
|
||||
luceneOptions.applyAllDeletes(),
|
||||
|
Loading…
Reference in New Issue
Block a user