Package com.couchbase.client

Examples of com.couchbase.client.CouchbaseConnectionFactoryBuilder


            if(password == null)
                password = "";

            // For membase connectivity: http://docs.couchbase.org/membase-sdk-java-api-reference/membase-sdk-java-started.html
            // And: http://code.google.com/p/spymemcached/wiki/Examples#Establishing_a_Membase_Connection
            final CouchbaseConnectionFactoryBuilder factory = newCouchbaseConnectionFactoryBuilder();
            factory.setOpTimeout(operationTimeout);
            factory.setMaxReconnectDelay(maxReconnectDelay);
            factory.setFailureMode(FailureMode.Redistribute);
            return new CouchbaseClient(factory.buildCouchbaseConnection(memcachedNodesManager.getCouchbaseBucketURIs(), username, password));
        } catch (final Exception e) {
            throw new RuntimeException("Could not create memcached client", e);
        }
    }
View Full Code Here


            throw new RuntimeException("Could not create memcached client", e);
        }
    }

    protected CouchbaseConnectionFactoryBuilder newCouchbaseConnectionFactoryBuilder() {
        return new CouchbaseConnectionFactoryBuilder();
    }
View Full Code Here

TOP

Related Classes of com.couchbase.client.CouchbaseConnectionFactoryBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.