* @author Robert Varga
*/
@Beta
-public final class ClientLocalHistory extends AbstractClientHistory implements AutoCloseable {
+public class ClientLocalHistory extends AbstractClientHistory implements AutoCloseable {
ClientLocalHistory(final AbstractDataStoreClientBehavior client, final LocalHistoryIdentifier historyId) {
super(client, historyId);
}
@Override
public void close() {
- final State local = state();
- if (local != State.CLOSED) {
- Preconditions.checkState(local == State.IDLE, "Local history %s has an open transaction", this);
- updateState(local, State.CLOSED);
- }
+ doClose();
}
private State ensureIdleState() {
@Override
ProxyHistory createHistoryProxy(final LocalHistoryIdentifier historyId,
final AbstractClientConnection<ShardBackendInfo> connection) {
- return ProxyHistory.createClient(connection, historyId);
+ return ProxyHistory.createClient(this, connection, historyId);
}
}