Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

yanjunli/memcache-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

2 Commits

Repository files navigation

OCS Java SDK Package

OCS Java SDK is an open source compatible MEMCACHED protocol that used to access ALIYUN's OCS and other compatible Memached service. This pacakge contains a single-threadded, and thread-safe ALIYUN's OCS client, which supports both asynchronous and synchronous style API, and contains full source code.

Please use the latest version 0.0.1.

Prerequisites:

Java 1.6 or greater. Maven 2.0 or greater. Netty 3.6.3.Final. The source code can be imported into any Java IDE. Please use Maven to build this package.

Build instructions:

mvn assembly:assembly

Examples

import com.aliyun.ocs.OcsClient;
import com.aliyun.ocs.OcsException;
import com.aliyun.ocs.OcsOptions;
import com.aliyun.ocs.utils.*;
void testOcs() {
	String domain = " aliyunocs.com";
	String username = "your ocs instance id";
	String password = "password";
	OcsClient ocs = new OcsClient(domain, username, password);
	OcsOptions options = OcsOptions.defaultOptions();
	OcsFuture<OcsResult> setFuture = ocs.set("key", "value", 0, 0, options);
	OcsFuture<OcsResult> getFuture = ocs.get("key", options);
	System.out.println(setFuture.get());
	System.out.println(getFuture.get())
}

About

memcache sdk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /