@Test public void testCommit() { String key = TestData.getSimpleString(); TObject value = TestData.getTObject(); long record = TestData.getLong(); add(key, value, record); ((AtomicOperation) store).commit(); Assert.assertTrue(destination.verify(key, value, record)); }
public final boolean commit() throws AtomicStateException { if(open.compareAndSet(true, false)) { if(grabLocks() && !notifiedAboutVersionChange && finalizing.compareAndSet(false, true)) { doCommit(); releaseLocks(); if(destination instanceof Transaction) { ((Transaction) destination).onCommit(this); } return true; } else { abort(); return false; } } else { try { checkState(); } catch (TransactionStateException e) { throw e; } catch (AtomicStateException e) {} return false; } }
AtomicOperation extends BufferedStore implements
        VersionChangeListener { public final boolean commit() throws AtomicStateException { if(open.compareAndSet(true, false)) { if(grabLocks() && !notifiedAboutVersionChange && finalizing.compareAndSet(false, true)) { doCommit(); releaseLocks(); if(destination instanceof Transaction) { ((Transaction) destination).onCommit(this); } return true; } else { abort(); return false; } } else { try { checkState(); } catch (TransactionStateException e) { throw e; } catch (AtomicStateException e) {} return false; } } }
AtomicOperation extends BufferedStore implements
        VersionChangeListener { public final boolean commit() throws AtomicStateException { if(open.compareAndSet(true, false)) { if(grabLocks() && !notifiedAboutVersionChange && finalizing.compareAndSet(false, true)) { doCommit(); releaseLocks(); if(destination instanceof Transaction) { ((Transaction) destination).onCommit(this); } return true; } else { abort(); return false; } } else { try { checkState(); } catch (TransactionStateException e) { throw e; } catch (AtomicStateException e) {} return false; } } protected  AtomicOperation(AtomicSupport destination); protected  AtomicOperation(Queue buffer, AtomicSupport destination); }
AtomicOperation extends BufferedStore implements
        VersionChangeListener { public final boolean commit() throws AtomicStateException { if(open.compareAndSet(true, false)) { if(grabLocks() && !notifiedAboutVersionChange && finalizing.compareAndSet(false, true)) { doCommit(); releaseLocks(); if(destination instanceof Transaction) { ((Transaction) destination).onCommit(this); } return true; } else { abort(); return false; } } else { try { checkState(); } catch (TransactionStateException e) { throw e; } catch (AtomicStateException e) {} return false; } } protected  AtomicOperation(AtomicSupport destination); protected  AtomicOperation(Queue buffer, AtomicSupport destination); void abort(); @Override boolean add(String key, TObject value, long record); @Override Map<Long, String> audit(long record); @Override Map<Long, String> audit(String key, long record); @Override Map<TObject, Set<Long>> browse(String key); @Override Map<TObject, Set<Long>> browse(String key, long timestamp); @Override Map<Long, Set<TObject>> chronologize(String key, long record,
            long start, long end); final boolean commit(); @Override boolean contains(long record); @Override Set<TObject> gather(String key, long record); @Override Set<TObject> gather(String key, long record, long timestamp); @Override @Restricted void onVersionChange(Token token); @Override boolean remove(String key, TObject value, long record); @Override Set<Long> search(String key, String query); @Override Map<String, Set<TObject>> select(long record); @Override Map<String, Set<TObject>> select(long record, long timestamp); @Override Set<TObject> select(String key, long record); @Override Set<TObject> select(String key, long record, long timestamp); @Override void set(String key, TObject value, long record); @Override final void start(); @Override final void stop(); void touch(long record); @Override boolean verify(String key, TObject value, long record); @Override boolean verify(String key, TObject value, long record,
            long timestamp); }
AtomicOperation extends BufferedStore implements
        VersionChangeListener { public final boolean commit() throws AtomicStateException { if(open.compareAndSet(true, false)) { if(grabLocks() && !notifiedAboutVersionChange && finalizing.compareAndSet(false, true)) { doCommit(); releaseLocks(); if(destination instanceof Transaction) { ((Transaction) destination).onCommit(this); } return true; } else { abort(); return false; } } else { try { checkState(); } catch (TransactionStateException e) { throw e; } catch (AtomicStateException e) {} return false; } } protected  AtomicOperation(AtomicSupport destination); protected  AtomicOperation(Queue buffer, AtomicSupport destination); void abort(); @Override boolean add(String key, TObject value, long record); @Override Map<Long, String> audit(long record); @Override Map<Long, String> audit(String key, long record); @Override Map<TObject, Set<Long>> browse(String key); @Override Map<TObject, Set<Long>> browse(String key, long timestamp); @Override Map<Long, Set<TObject>> chronologize(String key, long record,
            long start, long end); final boolean commit(); @Override boolean contains(long record); @Override Set<TObject> gather(String key, long record); @Override Set<TObject> gather(String key, long record, long timestamp); @Override @Restricted void onVersionChange(Token token); @Override boolean remove(String key, TObject value, long record); @Override Set<Long> search(String key, String query); @Override Map<String, Set<TObject>> select(long record); @Override Map<String, Set<TObject>> select(long record, long timestamp); @Override Set<TObject> select(String key, long record); @Override Set<TObject> select(String key, long record, long timestamp); @Override void set(String key, TObject value, long record); @Override final void start(); @Override final void stop(); void touch(long record); @Override boolean verify(String key, TObject value, long record); @Override boolean verify(String key, TObject value, long record,
            long timestamp);  }