Skip to content

Instantly share code, notes, and snippets.

@broach
Created April 19, 2013 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save broach/57ce9237ec32b47d8897 to your computer and use it in GitHub Desktop.
Save broach/57ce9237ec32b47d8897 to your computer and use it in GitHub Desktop.
import com.basho.riak.client.IRiakClient;
import com.basho.riak.client.IRiakObject;
import com.basho.riak.client.RiakException;
import com.basho.riak.client.RiakFactory;
import com.basho.riak.client.bucket.Bucket;
public class App
{
public static void main(String[] args) throws RiakException
{
IRiakClient client = RiakFactory.httpClient();
Bucket b = client.createBucket("sibling_test").allowSiblings(true).execute();
b.store("key1", "value1").execute();
b.delete("key1").execute();
b.store("key1", "value2").withoutFetch().execute();
IRiakObject o = b.fetch("key1").returnDeletedVClock(true).execute();
client.shutdown();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment