@Override public synchronized void delete(final long key) throws IOException { FilestoreTransaction tx = transaction(); tx.delete(key); final AtomicBoolean done = new AtomicBoolean(); tx.addListener(new TransactionListener() { @Override public void onSuccess() { done.set(true); } @Override public void onError(Exception e) { e.printStackTrace(System.err); done.set(true); } }); tx.commit(); U.waitFor(done); }
@Override public synchronized void delete(final long key) throws IOException { FilestoreTransaction tx = transaction(); tx.delete(key); final AtomicBoolean done = new AtomicBoolean(); tx.addListener(new TransactionListener() { @Override public void onSuccess() { done.set(true); } @Override public void onError(Exception e) { e.printStackTrace(System.err); done.set(true); } }); tx.commit(); U.waitFor(done); }
@Override public synchronized void delete(final long key) throws IOException { FilestoreTransaction tx = transaction(); tx.delete(key); final AtomicBoolean done = new AtomicBoolean(); tx.addListener(new TransactionListener() { @Override public void onSuccess() { done.set(true); } @Override public void onError(Exception e) { e.printStackTrace(System.err); done.set(true); } }); tx.commit(); U.waitFor(done); }
@Override public synchronized void write(long key, Object value) throws IOException { // print("WRITE " + key + "=" + value); FilestoreTransaction tx = transaction(); tx.write(key, value); final AtomicBoolean done = new AtomicBoolean(); tx.addListener(new TransactionListener() { @Override public void onSuccess() { done.set(true); } @Override public void onError(Exception e) { e.printStackTrace(System.err); done.set(true); } }); tx.commit(); U.waitFor(done); }
@Override public synchronized void write(long key, Object value) throws IOException { // print("WRITE " + key + "=" + value); FilestoreTransaction tx = transaction(); tx.write(key, value); final AtomicBoolean done = new AtomicBoolean(); tx.addListener(new TransactionListener() { @Override public void onSuccess() { done.set(true); } @Override public void onError(Exception e) { e.printStackTrace(System.err); done.set(true); } }); tx.commit(); U.waitFor(done); }
@Override public synchronized void write(long key, Object value) throws IOException { // print("WRITE " + key + "=" + value); FilestoreTransaction tx = transaction(); tx.write(key, value); final AtomicBoolean done = new AtomicBoolean(); tx.addListener(new TransactionListener() { @Override public void onSuccess() { done.set(true); } @Override public void onError(Exception e) { e.printStackTrace(System.err); done.set(true); } }); tx.commit(); U.waitFor(done); }