|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.spy.memcached.ConnectionFactoryBuilder
public class ConnectionFactoryBuilder
Builder for more easily configuring a ConnectionFactory.
Nested Class Summary | |
---|---|
static class |
ConnectionFactoryBuilder.Locator
Type of node locator to use. |
static class |
ConnectionFactoryBuilder.Protocol
Type of protocol to use for connections. |
Field Summary | |
---|---|
protected AuthDescriptor |
authDescriptor
|
protected FailureMode |
failureMode
|
protected HashAlgorithm |
hashAlg
|
protected java.util.Collection<ConnectionObserver> |
initialObservers
|
protected boolean |
isDaemon
|
protected ConnectionFactoryBuilder.Locator |
locator
|
protected long |
maxReconnectDelay
|
protected OperationFactory |
opFact
|
protected OperationQueueFactory |
opQueueFactory
|
protected long |
opQueueMaxBlockTime
|
protected long |
opTimeout
|
protected int |
readBufSize
|
protected OperationQueueFactory |
readQueueFactory
|
protected boolean |
shouldOptimize
|
protected int |
timeoutExceptionThreshold
|
protected Transcoder<java.lang.Object> |
transcoder
|
protected boolean |
useNagle
|
protected OperationQueueFactory |
writeQueueFactory
|
Constructor Summary | |
---|---|
ConnectionFactoryBuilder()
Set the operation queue factory. |
|
ConnectionFactoryBuilder(ConnectionFactory cf)
|
Method Summary | |
---|---|
ConnectionFactory |
build()
Get the ConnectionFactory set up with the provided parameters. |
ConnectionFactoryBuilder |
setAuthDescriptor(AuthDescriptor to)
Set the auth descriptor to enable authentication on new connections. |
ConnectionFactoryBuilder |
setDaemon(boolean d)
Set the daemon state of the IO thread (defaults to true). |
ConnectionFactoryBuilder |
setFailureMode(FailureMode fm)
Set the failure mode. |
ConnectionFactoryBuilder |
setHashAlg(HashAlgorithm to)
Set the hash algorithm. |
ConnectionFactoryBuilder |
setInitialObservers(java.util.Collection<ConnectionObserver> obs)
Set the initial connection observers (will observe initial connection). |
ConnectionFactoryBuilder |
setLocatorType(ConnectionFactoryBuilder.Locator l)
Set the locator type. |
ConnectionFactoryBuilder |
setMaxReconnectDelay(long to)
Set the maximum reconnect delay. |
ConnectionFactoryBuilder |
setOpFact(OperationFactory f)
Set the operation factory. |
ConnectionFactoryBuilder |
setOpQueueFactory(OperationQueueFactory q)
|
ConnectionFactoryBuilder |
setOpQueueMaxBlockTime(long t)
Set the maximum amount of time (in milliseconds) a client is willing to wait for space to become available in an output queue. |
ConnectionFactoryBuilder |
setOpTimeout(long t)
Set the default operation timeout in milliseconds. |
ConnectionFactoryBuilder |
setProtocol(ConnectionFactoryBuilder.Protocol prot)
Convenience method to specify the protocol to use. |
ConnectionFactoryBuilder |
setReadBufferSize(int to)
Set the read buffer size. |
ConnectionFactoryBuilder |
setReadOpQueueFactory(OperationQueueFactory q)
Set the read queue factory. |
ConnectionFactoryBuilder |
setShouldOptimize(boolean o)
Set to false if the default operation optimization is not desirable. |
ConnectionFactoryBuilder |
setTimeoutExceptionThreshold(int to)
Set the maximum timeout exception threshold. |
ConnectionFactoryBuilder |
setTranscoder(Transcoder<java.lang.Object> t)
Set the default transcoder. |
ConnectionFactoryBuilder |
setUseNagleAlgorithm(boolean to)
Set to true if you'd like to enable the Nagle algorithm. |
ConnectionFactoryBuilder |
setWriteOpQueueFactory(OperationQueueFactory q)
Set the write queue factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected OperationQueueFactory opQueueFactory
protected OperationQueueFactory readQueueFactory
protected OperationQueueFactory writeQueueFactory
protected Transcoder<java.lang.Object> transcoder
protected FailureMode failureMode
protected java.util.Collection<ConnectionObserver> initialObservers
protected OperationFactory opFact
protected ConnectionFactoryBuilder.Locator locator
protected long opTimeout
protected boolean isDaemon
protected boolean shouldOptimize
protected boolean useNagle
protected long maxReconnectDelay
protected int readBufSize
protected HashAlgorithm hashAlg
protected AuthDescriptor authDescriptor
protected long opQueueMaxBlockTime
protected int timeoutExceptionThreshold
Constructor Detail |
---|
public ConnectionFactoryBuilder()
public ConnectionFactoryBuilder(ConnectionFactory cf)
Method Detail |
---|
public ConnectionFactoryBuilder setOpQueueFactory(OperationQueueFactory q)
public ConnectionFactoryBuilder setReadOpQueueFactory(OperationQueueFactory q)
public ConnectionFactoryBuilder setWriteOpQueueFactory(OperationQueueFactory q)
public ConnectionFactoryBuilder setOpQueueMaxBlockTime(long t)
public ConnectionFactoryBuilder setTranscoder(Transcoder<java.lang.Object> t)
public ConnectionFactoryBuilder setFailureMode(FailureMode fm)
public ConnectionFactoryBuilder setInitialObservers(java.util.Collection<ConnectionObserver> obs)
public ConnectionFactoryBuilder setOpFact(OperationFactory f)
MemcachedNode
public ConnectionFactoryBuilder setOpTimeout(long t)
public ConnectionFactoryBuilder setDaemon(boolean d)
public ConnectionFactoryBuilder setShouldOptimize(boolean o)
public ConnectionFactoryBuilder setReadBufferSize(int to)
public ConnectionFactoryBuilder setHashAlg(HashAlgorithm to)
public ConnectionFactoryBuilder setUseNagleAlgorithm(boolean to)
public ConnectionFactoryBuilder setProtocol(ConnectionFactoryBuilder.Protocol prot)
public ConnectionFactoryBuilder setLocatorType(ConnectionFactoryBuilder.Locator l)
public ConnectionFactoryBuilder setMaxReconnectDelay(long to)
public ConnectionFactoryBuilder setAuthDescriptor(AuthDescriptor to)
public ConnectionFactoryBuilder setTimeoutExceptionThreshold(int to)
public ConnectionFactory build()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |