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() |
long |
getObsTimeout() |
Config |
getVBucketConfig() |
int |
getViewConnsPerNode() |
int |
getViewTimeout() |
int |
getViewWorkerSize() |
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)
Set the interval between observe polls in milliseconds.
|
CouchbaseConnectionFactoryBuilder |
setObsPollMax(int maxPoll)
Deprecated.
|
CouchbaseConnectionFactoryBuilder |
setObsTimeout(long timeout)
Set the timeout for observe-based operations in milliseconds.
|
void |
setReconnectThresholdTime(long time,
java.util.concurrent.TimeUnit unit) |
CouchbaseConnectionFactoryBuilder |
setStreamingNodeOrder(CouchbaseNodeOrder order)
Set the streaming connection node ordering.
|
void |
setVBucketConfig(Config config) |
CouchbaseConnectionFactoryBuilder |
setViewConnsPerNode(int conns) |
CouchbaseConnectionFactoryBuilder |
setViewTimeout(int timeout) |
CouchbaseConnectionFactoryBuilder |
setViewWorkerSize(int workers) |
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)
interval
- the interval in milliseconds.public CouchbaseConnectionFactoryBuilder setObsTimeout(long timeout)
timeout
- the timeout in milliseconds.@Deprecated public CouchbaseConnectionFactoryBuilder setObsPollMax(int maxPoll)
setObsPollInterval(long)
and setObsTimeout(long)
.maxPoll
- the maximum number of polls to run before giving up.public CouchbaseConnectionFactoryBuilder setViewTimeout(int timeout)
public CouchbaseConnectionFactoryBuilder setViewWorkerSize(int workers)
public CouchbaseConnectionFactoryBuilder setViewConnsPerNode(int conns)
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 long getObsTimeout()
public int getViewTimeout()
public int getViewWorkerSize()
public int getViewConnsPerNode()
Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.