Class TableSnapshot
java.lang.Object
com.illumon.iris.db.plot.util.tables.TableSnapshot
public class TableSnapshot extends Object
Computes snapshots of a
BaseTable.
On every table update a snapshot request is given to the FigureTableSnapshotManager.
A snapshot is a map from the column name to the columns data.-
Field Summary
Fields Modifier and Type Field Description static TableSnapshot[]ZERO_LENGTH_ARRAY -
Constructor Summary
Constructors Constructor Description TableSnapshot(BaseTable t, ChartImpl chart)TableSnapshot(BaseTable t, ChartImpl chart, FigureTableSnapshotManager manager) -
Method Summary
Modifier and Type Method Description voidaddTableSnapshotChangeListener(TableSnapshotChangeListener listener)voidfreeze()The snapshotReference will not be updated until this is thawed.Map<String,Object>getSnapshotData()BaseTablegetTable()voidonClose()Operations to perform once a plot is closed.voidremoveTableSnapshotChangeListener(TableSnapshotChangeListener tableSnapshotChangeListener)Removes specified table snapshot change listenervoidremoveTableSnapshotChangeListeners()Removes all table snapshot change listenersbooleanthaw()createSnapshot will once again update the snapshotReference.
-
Field Details
-
Constructor Details
-
Method Details
-
getTable
-
getSnapshotData
-
freeze
public void freeze()The snapshotReference will not be updated until this is thawed. -
thaw
public boolean thaw()createSnapshot will once again update the snapshotReference. snapshotReference will be set to the last snapshot constructed during the freeze, if one exists.- Returns:
- whether a snapshot was constructed while frozen
-
onClose
public void onClose()Operations to perform once a plot is closed. -
addTableSnapshotChangeListener
-
removeTableSnapshotChangeListeners
public void removeTableSnapshotChangeListeners()Removes all table snapshot change listeners -
removeTableSnapshotChangeListener
public void removeTableSnapshotChangeListener(TableSnapshotChangeListener tableSnapshotChangeListener)Removes specified table snapshot change listener- Parameters:
tableSnapshotChangeListener- listener to remove
-