@Test public void testDoClose() { object().createTransactionProxy(TRANSACTION_ID, 0L); object().doClose(); Assert.assertEquals(AbstractClientHistory.State.CLOSED, object().state()); }
final synchronized void doClose() { final State local = state; if (local != State.CLOSED) { checkState(local == State.IDLE, "Local history %s has an open transaction", this); histories.values().forEach(ProxyHistory::close); updateState(local, State.CLOSED); } }
AbstractClientHistory extends LocalAbortable implements Identifiable<LocalHistoryIdentifier> { final synchronized void doClose() { final State local = state; if (local != State.CLOSED) { checkState(local == State.IDLE, "Local history %s has an open transaction", this); histories.values().forEach(ProxyHistory::close); updateState(local, State.CLOSED); } } }
AbstractClientHistory extends LocalAbortable implements Identifiable<LocalHistoryIdentifier> { final synchronized void doClose() { final State local = state; if (local != State.CLOSED) { checkState(local == State.IDLE, "Local history %s has an open transaction", this); histories.values().forEach(ProxyHistory::close); updateState(local, State.CLOSED); } } AbstractClientHistory(final AbstractDataStoreClientBehavior client, final LocalHistoryIdentifier identifier); }
AbstractClientHistory extends LocalAbortable implements Identifiable<LocalHistoryIdentifier> { final synchronized void doClose() { final State local = state; if (local != State.CLOSED) { checkState(local == State.IDLE, "Local history %s has an open transaction", this); histories.values().forEach(ProxyHistory::close); updateState(local, State.CLOSED); } } AbstractClientHistory(final AbstractDataStoreClientBehavior client, final LocalHistoryIdentifier identifier); @Override LocalHistoryIdentifier getIdentifier(); ClientTransaction createTransaction(); ClientSnapshot takeSnapshot(); }
AbstractClientHistory extends LocalAbortable implements Identifiable<LocalHistoryIdentifier> { final synchronized void doClose() { final State local = state; if (local != State.CLOSED) { checkState(local == State.IDLE, "Local history %s has an open transaction", this); histories.values().forEach(ProxyHistory::close); updateState(local, State.CLOSED); } } AbstractClientHistory(final AbstractDataStoreClientBehavior client, final LocalHistoryIdentifier identifier); @Override LocalHistoryIdentifier getIdentifier(); ClientTransaction createTransaction(); ClientSnapshot takeSnapshot();  }