CavalliumDBEngine/src/main/java/it/cavallium/dbengine/client/LazyHitEntry.java

12 lines
311 B
Java
Raw Normal View History

2021-10-28 23:48:25 +02:00
package it.cavallium.dbengine.client;
import org.jetbrains.annotations.NotNull;
import reactor.core.publisher.Mono;
public record LazyHitEntry<T, U>(Mono<T> key, Mono<U> value, float score) {
public Mono<HitEntry<T, U>> resolve() {
return Mono.zip(key, value, (k, v) -> new HitEntry<>(k, v, score));
}
}