io.deephaven.engine.table.impl.replay.ReplayTableBase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-engine-table Show documentation
Show all versions of deephaven-engine-table Show documentation
Engine Table: Implementation and closely-coupled utilities
package io.deephaven.engine.table.impl.replay;
import io.deephaven.engine.rowset.TrackingRowSet;
import io.deephaven.engine.table.ColumnSource;
import io.deephaven.engine.table.impl.InstrumentedTableUpdateSource;
import io.deephaven.engine.table.impl.QueryTable;
import org.jetbrains.annotations.NotNull;
import java.util.Map;
public abstract class ReplayTableBase extends QueryTable implements Runnable {
private final SourceRefresher sourceRefresher;
public ReplayTableBase(
@NotNull final String description,
@NotNull final TrackingRowSet rowSet,
@NotNull final Map> columns) {
super(rowSet, columns);
setRefreshing(true);
sourceRefresher = new SourceRefresher(description);
}
public void start() {
updateGraph.addSource(sourceRefresher);
}
public void stop() {
updateGraph.removeSource(sourceRefresher);
}
private class SourceRefresher extends InstrumentedTableUpdateSource {
SourceRefresher(final String description) {
super(ReplayTableBase.this, description);
}
@Override
protected void instrumentedRefresh() {
ReplayTableBase.this.run();
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy