kumai / kt4j

Kyoto Tycoon client for Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KT4J

KT4J is a simple implementation of Kyoto Tycoon client for Java.

Requirements

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)

Usage

  1. Add kt4j-x.y.z.jar and netty-3.3.x.Final.jar to the application's CLASSPATH.
  2. Create kt4j.binary.KyotoTycoonBinaryClient and call start() of the instance in your application.
  3. 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();
  }
}

Building

KT4J uses Gradle to build. KT4J includes Gradle Wrapper.

$ cd kt4j
$ ./gradlew jar

About

Kyoto Tycoon client for Java

License:Apache License 2.0


Languages

Language:Java 99.7%Language:Groovy 0.3%