Created
February 8, 2012 01:12
-
-
Save ingenthr/1763980 to your computer and use it in GitHub Desktop.
example of capping input queue and blocking with timeout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List<URI> baselist = new ArrayList<URI>(); | |
| baselist.add(new URI("http://localhost:8091/pools")); | |
| CouchbaseConnectionFactoryBuilder cfb = new CouchbaseConnectionFactoryBuilder(); | |
| cfb.setOpTimeout(10000); // wait up to 10 seconds for an operation to succeed | |
| cfb.setOpQueueMaxBlockTime(5000); // wait up to 5 seconds when trying to enqueue an operation | |
| CouchbaseClient myclient = new CouchbaseClient(cfb.buildCouchbaseConnection(baselist, "default", "default", "")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment