I am trying to migrate from Couchbase 2 to Couchbase 3.
But there are lot of compilation errors in below code
// Loop size
.take(ids.size())
// Update by each item
.flatMap(index -> {
String documentId = ids.get(index.intValue());
AsyncMutateInBuilder builder = bucket.async().mutateIn(documentId);
builder.upsert("status", status);
builder.upsert("updated_datetime", updatedDatetime);
return builder.execute().onErrorReturn(ex -> {
// skip DocumentDoesNotExistException
if (ex instanceof DocumentDoesNotExistException) {
LOG.warn("Doesn't get item [ docId = {} ]", docId);
return null;
}
throw new PlatformCouchbaseRetryException(ex);
});
})
// handling error
.onErrorReturn(ex -> {
throw new PlatformCouchbaseRetryException(ex);
})
// synchronized
.toBlocking().last();
config,getUpdatedDatetimeInterval()
is long
-
Observable is not supported in SDK 3 and if i try to use Flux then i am not sure of the Duration and Scheduler that i need to provide in
Flux.interval(Duration, Scheduler) -
AsyncMutateInBuilder is not supported in SDK3
How can i modify the existing code to be in SDK3 ?