Skip to content

xmemcached 2.2.1-beta

Pre-release
Pre-release
Compare
Choose a tag to compare
@killme2008 killme2008 released this 03 Nov 06:35
· 134 commits to master since this release

A beta release for #37 and PR #50

Use AWSElasticCacheClient in AWS ElasticCache, for example:

import java.net.InetSocketAddress;

import net.rubyeye.xmemcached.aws.AWSElasticCacheClient;
import net.rubyeye.xmemcached.aws.ClusterConfigration;
import net.rubyeye.xmemcached.command.BinaryCommandFactory;
import net.rubyeye.xmemcached.command.TextCommandFactory;


public class Test {
    public static void main(String args[]) throws Exception {
        AWSElasticCacheClient client =
        new AWSElasticCacheClient(new InetSocketAddress("AWS ElasticCache endpoint host", 11211));
        ClusterConfigration conf = client.getConfig();
        System.out.println(conf.toString());
        client.set("a", 0, 1);
        System.out.println((Object)client.get("a"));
    }
}

It will auto discovery AWS ElasticCache nodes and connect to them for service, then refresh the nodes list in background between configured poll interval. (It is 1 hour by default).

Maven:

   <dependency>
              <groupId>com.googlecode.xmemcached</groupId>
              <artifactId>xmemcached</artifactId>
              <version>2.2.1-beta</version>
  </dependency>

Any test and feedback is welcome!