Example:
package voldemort.examples;
import voldemort.client.ClientConfig;
import voldemort.client.SocketStoreClientFactory;
import voldemort.client.StoreClient;
import voldemort.client.StoreClientFactory;
import voldemort.versioning.Versioned;
public class ClientExample {
public static void main(String[] args) {
// In real life this stuff would get wired in
String bootstrapUrl = "tcp://localhost:6666";
StoreClientFactory factory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(bootstrapUrl));
StoreClient
// get the value
Versioned
// modify the value
version.setObject("new_value");
// update the value
client.put("some_key", version);
}
}
really easy isn't it? confuse? let's discuss it here.
No comments:
Post a Comment