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 void
addTableSnapshotChangeListener(TableSnapshotChangeListener listener)
void
freeze()
The snapshotReference will not be updated until this is thawed.Map<String,Object>
getSnapshotData()
BaseTable
getTable()
void
onClose()
Operations to perform once a plot is closed.void
removeTableSnapshotChangeListener(TableSnapshotChangeListener tableSnapshotChangeListener)
Removes specified table snapshot change listenervoid
removeTableSnapshotChangeListeners()
Removes all table snapshot change listenersboolean
thaw()
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
-