Fix compilation issue

This commit is contained in:
Andrea Cavalli 2021-09-07 11:28:03 +02:00
parent 717d13ef1f
commit d4ed99cc24
5 changed files with 9 additions and 7 deletions

View File

@ -241,7 +241,7 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
@Override
public Mono<Void> addDocument(LLTerm key, LLDocument doc) {
return Mono.fromCallable(() -> {
return Mono.<Void>fromCallable(() -> {
activeTasks.register();
try {
//noinspection BlockingMethodInNonBlockingContext
@ -274,7 +274,7 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
@Override
public Mono<Void> deleteDocument(LLTerm id) {
return Mono.fromCallable(() -> {
return Mono.<Void>fromCallable(() -> {
activeTasks.register();
try {
//noinspection BlockingMethodInNonBlockingContext
@ -288,7 +288,7 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
@Override
public Mono<Void> updateDocument(LLTerm id, LLDocument document) {
return Mono.fromCallable(() -> {
return Mono.<Void>fromCallable(() -> {
activeTasks.register();
try {
//noinspection BlockingMethodInNonBlockingContext
@ -307,7 +307,7 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
private Mono<Void> updateDocuments(Map<LLTerm, LLDocument> documentsMap) {
return Mono
.fromCallable(() -> {
.<Void>fromCallable(() -> {
activeTasks.register();
try {
for (Entry<LLTerm, LLDocument> entry : documentsMap.entrySet()) {

View File

@ -69,6 +69,7 @@ import org.warp.commonutils.log.LoggerFactory;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Scheduler;
import reactor.core.scheduler.Schedulers;
public class LuceneUtils {

View File

@ -50,7 +50,7 @@ class ScoredSimpleLuceneShardSearcher implements LuceneShardSearcher {
Mono<Void> releaseIndexSearcher,
LocalQueryParams queryParams,
Scheduler scheduler) {
return Mono.fromCallable(() -> {
return Mono.<Void>fromCallable(() -> {
if (Schedulers.isInNonBlockingThread()) {
throw new UnsupportedOperationException("Called searchOn in a nonblocking thread");
}

View File

@ -43,7 +43,7 @@ class UnscoredPagedLuceneShardSearcher implements LuceneShardSearcher {
Mono<Void> releaseIndexSearcher,
LocalQueryParams queryParams,
Scheduler scheduler) {
return Mono.fromCallable(() -> {
return Mono.<Void>fromCallable(() -> {
if (Schedulers.isInNonBlockingThread()) {
throw new UnsupportedOperationException("Called searchOn in a nonblocking thread");
}

View File

@ -102,10 +102,11 @@ public class UnscoredUnsortedContinuousLuceneMultiSearcher implements LuceneMult
LocalQueryParams queryParams,
Scheduler scheduler) {
return Mono
.fromCallable(() -> {
.<Void>fromCallable(() -> {
if (Schedulers.isInNonBlockingThread()) {
throw new UnsupportedOperationException("Called searchOn in a nonblocking thread");
}
//noinspection BlockingMethodInNonBlockingContext
var collector = cm.newCollector();
int collectorShardIndex;
synchronized (lock) {