net.spy.memcached.spring
Class MemcachedClientFactoryBean
java.lang.Object
net.spy.memcached.spring.MemcachedClientFactoryBean
- All Implemented Interfaces:
- org.springframework.beans.factory.FactoryBean
public class MemcachedClientFactoryBean
- extends Object
- implements org.springframework.beans.factory.FactoryBean
A Spring FactoryBean
creating MemcachedClient
instances.
Usage example:
<bean id="memcachedClient" class="net.spy.memcached.utils.MemcachedClientFactoryBean">
<property name="servers" value="${pajamas.remoteHosts}"/>
<property name="protocol" value="${pajamas.client.protocol}"/>
<property name="transcoder">
<bean class="net.rubyeye.xmemcached.transcoders.SerializingTranscoder"/>
</property>
<property name="hashAlg" value="${pajamas.client.hashAlg}"/>
<property name="locatorType" value="${pajamas.client.locatorType}"/>
</bean>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemcachedClientFactoryBean
public MemcachedClientFactoryBean()
getObject
public Object getObject()
throws Exception
- Specified by:
getObject
in interface org.springframework.beans.factory.FactoryBean
- Throws:
Exception
getObjectType
public Class getObjectType()
- Specified by:
getObjectType
in interface org.springframework.beans.factory.FactoryBean
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interface org.springframework.beans.factory.FactoryBean
setServers
public void setServers(String servers)
setAuthDescriptor
public void setAuthDescriptor(AuthDescriptor to)
setDaemon
public void setDaemon(boolean d)
setFailureMode
public void setFailureMode(FailureMode fm)
setHashAlg
public void setHashAlg(HashAlgorithm to)
setInitialObservers
public void setInitialObservers(Collection<ConnectionObserver> obs)
setLocatorType
public void setLocatorType(ConnectionFactoryBuilder.Locator l)
setMaxReconnectDelay
public void setMaxReconnectDelay(long to)
setOpFact
public void setOpFact(OperationFactory f)
setOpQueueFactory
public void setOpQueueFactory(OperationQueueFactory q)
setOpQueueMaxBlockTime
public void setOpQueueMaxBlockTime(long t)
setOpTimeout
public void setOpTimeout(long t)
setProtocol
public void setProtocol(ConnectionFactoryBuilder.Protocol prot)
setReadBufferSize
public void setReadBufferSize(int to)
setReadOpQueueFactory
public void setReadOpQueueFactory(OperationQueueFactory q)
setShouldOptimize
public void setShouldOptimize(boolean o)
setTimeoutExceptionThreshold
public void setTimeoutExceptionThreshold(int to)
setTranscoder
public void setTranscoder(Transcoder<Object> t)
setUseNagleAlgorithm
public void setUseNagleAlgorithm(boolean to)
setWriteOpQueueFactory
public void setWriteOpQueueFactory(OperationQueueFactory q)