I have written a code in Java to read multiple documents in bulk from a Bucket in CouchBase. I have made it functional somehow, but I don't understand how it works.
I'm making my project on NetBeans IDE. I copied this code from some website and made it work somehow. I am completely new to CouchBase and kinda okay with java. But I don't understand anything about CouchBase and it's API.
Here, appbucket is my Bucket in CouchBase.
--------------------------------------------
```
List<String> docIds = new ArrayList<>();
List<JsonDocument> docFromCouch = Observable
.from(docIds)
.retryWhen(RetryBuilder.anyOf(IllegalStateException.class).max(retries).delay(Delay.linear(TimeUnit.SECONDS,timeout)).build())
.flatMap(appbucket.async()::get)
.toList()
.toBlocking()
.single();
```
--------------------------------------------
This is from my pom.xml file. I don't understand this as well except this is the jar file which enables us to use certain functions.
--------------------------------------------
```
<groupId>com.couchbase.client</groupId>
<artifactId>java-client</artifactId>
<version>2.7.7</version>
<type>jar</type>
```
--------------------------------------------
Although I tried to understand what these functions do and how from CouchBase Docs, but as I said I'm a newbie and all those things went over my head.
Explanation for each function is really needed. Thanks a lot guys.
0 Answer(s)