Custom executor service is a cool feature

Hi All!

As I learn more and more about Couchbase -> I'm getting more confident about -> it will be a super handy-dandy NoSql tool for me =D

I had to append our API because of this smart Couchbase feature ->

It is also possible to override the default `ExecutorService` implementation with a custom one. This may be needed if the default behavior (Basically a upper-bounded cachedThreadPool) does not suite your needs. Also, you should use this approach if you create a bunch of `CouchbaseClient` instances so you can share the same service across all of them

* Returns our executor service instance. <br><br>
* Why?!! For example Couchbase supporting to set/use our executor service
* instead of -> the default one (in the client driver) ;D
* Factory types newSingleThreadExecutor() newCachedThreadPool() newFixedThreadPool()
* newScheduledThreadPool().
* @see
* @return the executor service
public ExecutorService getExecutorService() {
    return (executorService);	

Sounds interesting -> go ahead and read this blog post:

I've used the RDM Server for OLTP very long time -> I'm happy because we have a NATIVE API again!

Thank You Guys :D


More options sometimes could be useful -> "Ask a question" / "Share a thought".


1 Answer

« Back to question.

Sure, on the CouchbaseConnectionFactoryBuilder there is a method where you can pass in your own executor service!

Lol, that's why I was add this link!!