public class CouchbaseConnectionFactoryBuilder
extends net.spy.memcached.ConnectionFactoryBuilder
Modifier and Type | Field and Description |
---|---|
protected net.spy.memcached.metrics.MetricCollector |
collector |
protected java.util.concurrent.ExecutorService |
executorService |
protected net.spy.memcached.metrics.MetricType |
metricType |
authDescriptor, failureMode, hashAlg, initialObservers, isDaemon, locator, maxReconnectDelay, opFact, opQueueFactory, opQueueMaxBlockTime, opTimeout, readBufSize, readQueueFactory, shouldOptimize, timeoutExceptionThreshold, transcoder, useNagle, writeQueueFactory
Constructor and Description |
---|
CouchbaseConnectionFactoryBuilder() |
Modifier and Type | Method and Description |
---|---|
CouchbaseConnectionFactory |
buildCouchbaseConnection()
Get the CouchbaseConnectionFactory set up with parameters provided by
system properties.
|
CouchbaseConnectionFactory |
buildCouchbaseConnection(java.util.List<java.net.URI> baseList,
java.lang.String bucketName,
java.lang.String pwd)
Get the CouchbaseConnectionFactory set up with the provided parameters.
|
CouchbaseConnectionFactory |
buildCouchbaseConnection(java.util.List<java.net.URI> baseList,
java.lang.String bucketName,
java.lang.String usr,
java.lang.String pwd)
Get the CouchbaseConnectionFactory set up with the provided parameters.
|
long |
getObsPollInterval() |
int |
getObsPollMax() |
Config |
getVBucketConfig() |
int |
getViewTimeout() |
net.spy.memcached.ConnectionFactoryBuilder |
setEnableMetrics(net.spy.memcached.metrics.MetricType type)
Enable or disable metric collection.
|
net.spy.memcached.ConnectionFactoryBuilder |
setListenerExecutorService(java.util.concurrent.ExecutorService executorService)
Set a custom
ExecutorService to execute the listener callbacks. |
net.spy.memcached.ConnectionFactoryBuilder |
setMetricCollector(net.spy.memcached.metrics.MetricCollector collector)
Set a custom
MetricCollector . |
CouchbaseConnectionFactoryBuilder |
setObsPollInterval(long interval) |
CouchbaseConnectionFactoryBuilder |
setObsPollMax(int maxPoll) |
void |
setReconnectThresholdTime(long time,
java.util.concurrent.TimeUnit unit) |
CouchbaseConnectionFactoryBuilder |
setStreamingNodeOrder(CouchbaseNodeOrder order)
Set the streaming connection node ordering.
|
void |
setVBucketConfig(Config config) |
CouchbaseConnectionFactoryBuilder |
setViewTimeout(int timeout) |
build, setAuthDescriptor, setDaemon, setFailureMode, setHashAlg, setInitialObservers, setLocatorType, setMaxReconnectDelay, setOpFact, setOpQueueFactory, setOpQueueMaxBlockTime, setOpTimeout, setProtocol, setReadBufferSize, setReadOpQueueFactory, setShouldOptimize, setTimeoutExceptionThreshold, setTranscoder, setUseNagleAlgorithm, setWriteOpQueueFactory
protected net.spy.memcached.metrics.MetricType metricType
protected net.spy.memcached.metrics.MetricCollector collector
protected java.util.concurrent.ExecutorService executorService
public Config getVBucketConfig()
public void setVBucketConfig(Config config)
public void setReconnectThresholdTime(long time, java.util.concurrent.TimeUnit unit)
public CouchbaseConnectionFactoryBuilder setObsPollInterval(long interval)
public CouchbaseConnectionFactoryBuilder setObsPollMax(int maxPoll)
public CouchbaseConnectionFactoryBuilder setViewTimeout(int timeout)
public CouchbaseConnectionFactoryBuilder setStreamingNodeOrder(CouchbaseNodeOrder order)
order
- the ordering to use.public net.spy.memcached.ConnectionFactoryBuilder setEnableMetrics(net.spy.memcached.metrics.MetricType type)
setEnableMetrics
in class net.spy.memcached.ConnectionFactoryBuilder
type
- the metric type to use (or disable).public net.spy.memcached.ConnectionFactoryBuilder setMetricCollector(net.spy.memcached.metrics.MetricCollector collector)
MetricCollector
.setMetricCollector
in class net.spy.memcached.ConnectionFactoryBuilder
collector
- the metric collector to use.public net.spy.memcached.ConnectionFactoryBuilder setListenerExecutorService(java.util.concurrent.ExecutorService executorService)
ExecutorService
to execute the listener callbacks.setListenerExecutorService
in class net.spy.memcached.ConnectionFactoryBuilder
executorService
- the ExecutorService to use.public CouchbaseConnectionFactory buildCouchbaseConnection(java.util.List<java.net.URI> baseList, java.lang.String bucketName, java.lang.String pwd) throws java.io.IOException
baseList
- a list of URI's that will be used to connect to the clusterbucketName
- the name of the bucket to connect to, also used for
usernamepwd
- the password for the bucketjava.io.IOException
public CouchbaseConnectionFactory buildCouchbaseConnection(java.util.List<java.net.URI> baseList, java.lang.String bucketName, java.lang.String usr, java.lang.String pwd) throws java.io.IOException
baseList
- a list of URI's that will be used to connect to the clusterbucketName
- the name of the bucket to connect tousr
- the username for the bucketpwd
- the password for the bucketjava.io.IOException
public CouchbaseConnectionFactory buildCouchbaseConnection() throws java.io.IOException
java.io.IOException
public long getObsPollInterval()
public int getObsPollMax()
public int getViewTimeout()
Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.