The JDK document said:
Always create only one instance of a CouchbaseCluster and share it across threads (same with buckets).
The SDK is thread-safe, so no additional synchronization is needed when interacting with the SDK.
I use the jdk client in a multithread environment, and I only open one Bucket handler for the same bucket. I find that the data got from one thread maybe mixed with other thread. So I have to synchronized the get operation.
Does the Bucket handler is thread safe?
Should I open one handler per thread?