Caching 如何从SpymeCached客户端访问Infinispan Memcached服务器缓存容器?
我已经在Infinispan上使用Memcached创建了一个分布式集群 现在,我需要使用SpymeCached客户端访问缓存 我试过这个:Caching 如何从SpymeCached客户端访问Infinispan Memcached服务器缓存容器?,caching,memcached,client,infinispan,Caching,Memcached,Client,Infinispan,我已经在Infinispan上使用Memcached创建了一个分布式集群 现在,我需要使用SpymeCached客户端访问缓存 我试过这个: AuthDescriptor ad2 = new AuthDescriptor(new String[]{"PLAIN"}, new PlainCallbackHandler("username", "cryptedpass")); ConnectionFactoryBuilder factoryBuilder = new ConnectionFactor
AuthDescriptor ad2 = new AuthDescriptor(new String[]{"PLAIN"}, new PlainCallbackHandler("username", "cryptedpass"));
ConnectionFactoryBuilder factoryBuilder = new ConnectionFactoryBuilder();
SerializingTranscoder transcoder=new SerializingTranscoder();
transcoder.setCompressionThreshold(1024);
ConnectionFactory cf = factoryBuilder
.setTranscoder(transcoder)
.setOpTimeout(10000)
.setMaxReconnectDelay(10000)
.setTimeoutExceptionThreshold(1998)
.setLocatorType(Locator.CONSISTENT)
.setFailureMode(FailureMode.Retry)
.setUseNagleAlgorithm(false)
.setProtocol(Protocol.BINARY)
.setAuthDescriptor(ad2).build();
MemcachedClient memcachedClient = new MemcachedClient(cf,Collections.singletonList(new InetSocketAddress("ONE_NODE_IP_ADDRESS", 11211)));
memcachedClient.add("test", 0, "testData");
但我得到了这个错误:
2014-03-21 19:19:22.952 WARN net.spy.memcached.protocol.binary.BinaryMemcachedNodeImpl: Operation canceled because authentication or reconnection and authentication has taken more than one second to complete.
在我看来,这已经有点令人困惑了。如果在一台机器上我有多个缓存,我的客户端会选择哪个缓存
多谢各位 Infinispan仅支持Memcached协议的文本版本