KT4J is a simple implementation of Kyoto Tycoon client for Java.
The minimum requirements to run the application using KT4J are only three:
- JDK 6 or above
- the latest version of KT4J
- Netty (netty-3.3.x.Final.jar)
- Add kt4j-x.y.z.jar and netty-3.3.x.Final.jar to the application's CLASSPATH.
- Create kt4j.binary.KyotoTycoonBinaryClient and call start() of the instance in your application.
- Call various Kyoto Tycoon's procedures. (see kt4j.KyotoTycoonClient)
Example:
import kt4j.binary.KyotoTycoonBinaryClient;
public class Bootstrap {
public static void main(String[] args) {
KyotoTycoonBinaryClient client = new KyotoTycoonBinaryClient("kyoto_tycoon_host", 1978);
client.start();
client.set("KEY", "VALUE");
String v = client.get("KEY");
System.out.println(v); // => "VALUE"
client.stop();
}
}
KT4J uses Gradle to build. KT4J includes Gradle Wrapper.
$ cd kt4j
$ ./gradlew jar