RiakBinaryStore implements BinaryStore, Disposable { public RiakBinaryStore(RiakClient client, String bucket) { this.client = client; this.bucket = ByteString.copyFromUtf8(bucket); } RiakBinaryStore(RiakClient client, String bucket); @Override Binary load(Binary binKey); @Override void store(Binary binKey, Binary binValue); @Override void erase(Binary binKey); @Override void eraseAll(); @Override Iterator keys(); @Override void dispose();  }
@Test public void testRiakBinaryStore() throws IOException { Loader loader = new CsvToCoherence("countries.csv", countries, Country.class); long start = System.currentTimeMillis(); loader.load(); long duration = System.currentTimeMillis() - start; System.out.println("Stored " + countries.size() + " objects to Riak in " + duration + " ms"); assertEquals(244, countries.size()); start = System.currentTimeMillis(); Set<String> keys = countries.keySet(); duration = System.currentTimeMillis() - start; System.out.println("Retrieved " + keys.size() + " keys in " + duration + " ms"); start = System.currentTimeMillis(); for (String key : keys) { Country country = (Country) countries.get(key); System.out.println(country); } duration = System.currentTimeMillis() - start; System.out.println("Loaded " + countries.size() + " objects from Riak in " + duration + " ms"); }