Is is possible for you to move your application to the latest Couchbase SDK?
With the latest Couchbase client you will be able to do:
List uris = new ArrayList();
CouchbaseClient client = new CouchbaseClient(uris, “default”, “”);
Boolean response = client.flush().get();
Will also check why you have an issue with Spy2.8.2
Please assist or we will not be able to upgrade to 2.0
And yes i know it is against recommended practice to do a flush.
Java code that invokes flush from spymemcached (worked with 1.8.x and spy.memcached 2.7.3)
MemcachedClientIF cacheClient = getClient(cache.getBucketName());
We moved to spy.memcached 2.8.2 with no luck.
In Couchbase Server, flush() needs to be handled a bit differently and spymemcached does only a flush that Couchbase Server cannot handle.
As Tug says, you can use the CouchbaseClient, but there is unfortunately one other minor bug in Couchbase Server 2.0 relating to flush. Currently, you have to use the Administrator username/password.
Your best way to use flush with Couchbase Server 2.0 is to first enable flush on the cluster, then use the ClusterManager class with the Administrator credentials from Couchbase Client 1.1 to perform your flush().
Note the bug tracking this on Couchbase Server is MB-7381.