Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Caching 如何从SpymeCached客户端访问Infinispan Memcached服务器缓存容器?_Caching_Memcached_Client_Infinispan - Fatal编程技术网

Caching 如何从SpymeCached客户端访问Infinispan Memcached服务器缓存容器?

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

我已经在Infinispan上使用Memcached创建了一个分布式集群

现在,我需要使用SpymeCached客户端访问缓存

我试过这个:

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协议的文本版本