CavalliumDBEngine/src/main/java/it/cavallium/dbengine/client/LazyHitEntry.java
2021-10-28 23:57:23 +02:00

12 lines
311 B
Java

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));
}
}