# aliyun-ocs-java-sdk **Repository Path**: aliyun/aliyun-ocs-java-sdk ## Basic Information - **Project Name**: aliyun-ocs-java-sdk - **Description**: aliyun-ocs-java-sdk - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-08 - **Last Updated**: 2025-06-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #### OCS Java SDK Package OCS Java SDK is an open source compatible MEMCACHED protocol client 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 setFuture = ocs.set("key", "value", 0, 0, options); OcsFuture getFuture = ocs.get("key", options); System.out.println(setFuture.get()); System.out.println(getFuture.get()) } ```