use of com.couchbase.client.java.kv.LookupInOptions in project couchbase-jvm-clients by couchbase.
the class ReactiveCollection method lookupIn.
/**
* Performs lookups to document fragments with custom options.
*
* @param id the outer document ID.
* @param specs the spec which specifies the type of lookups to perform.
* @param options custom options to modify the lookup options.
* @return the {@link LookupInResult} once the lookup has been performed or failed.
*/
public Mono<LookupInResult> lookupIn(final String id, List<LookupInSpec> specs, final LookupInOptions options) {
return Mono.defer(() -> {
notNull(options, "LookupInOptions", () -> ReducedKeyValueErrorContext.create(id, asyncCollection.collectionIdentifier()));
LookupInOptions.Built opts = options.build();
JsonSerializer serializer = opts.serializer() == null ? environment().jsonSerializer() : opts.serializer();
SubdocGetRequest request = asyncCollection.lookupInRequest(id, specs, opts);
return Reactor.wrap(request, LookupInAccessor.lookupInAccessor(core, request, serializer), true);
});
}
use of com.couchbase.client.java.kv.LookupInOptions in project couchbase-jvm-clients by couchbase.
the class AsyncCollection method lookupIn.
/**
* Performs lookups to document fragments with custom options.
*
* @param id the outer document ID.
* @param specs the spec which specifies the type of lookups to perform.
* @param options custom options to modify the lookup options.
* @return the {@link LookupInResult} once the lookup has been performed or failed.
*/
public CompletableFuture<LookupInResult> lookupIn(final String id, final List<LookupInSpec> specs, final LookupInOptions options) {
notNull(options, "LookupInOptions", () -> ReducedKeyValueErrorContext.create(id, collectionIdentifier));
LookupInOptions.Built opts = options.build();
final JsonSerializer serializer = opts.serializer() == null ? environment.jsonSerializer() : opts.serializer();
return LookupInAccessor.lookupInAccessor(core, lookupInRequest(id, specs, opts), serializer);
}
Aggregations