Hi,
I am using Cocuhbase 5.1 Enterprise edition and Java SDk 2.5.5.
I am implementing Singleton class for Cluster and Bucket Instance to communicate with Cocuhbase server using Java SDK 2.5.5.
My Question is Do I need to use “synchronized” while invoking CouchbaseCluster.create() and cluster.openBucket() or not?
example
synchronized(this)
{
Cluster cluster = CouchbaseCluster.create(“node1 IP”, “node2 IP”);
}
As per my understanding both the operation are thread-safe.
Please suggest on this.
Regards,
Suresh