Class SwappableTable<KEY_TYPE,VALUE_TYPE>
java.lang.Object
com.illumon.iris.db.plot.util.tables.SwappableTable<KEY_TYPE,VALUE_TYPE>
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SwappableTableOneClickAbstract
Holds a handle on a table that may get swapped out for another table.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Listens for when the table gets swapped out. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSwappableTable
(TableMapHandle tableMapHandle) Creates a SwappableTable instance with thetableHandle
. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
Adds a column to the underlying table structures.void
addDataChangeListener
(DataChangeListener listener) Adds a listener to the update list.Adds a listener to the update list.protected void
protected abstract Table
Computes the remote table.protected void
void
protected abstract String
Get a readable name for use with threads/logs etc.protected FigureTableSnapshotManager
Gets the signature (columns and types) of the table, \even if the data is transformed.Gets theTableHandle
for this SwappableTable.protected void
protected abstract void
protected void
void
Removes a listener to the update list.void
setManager
(FigureTableSnapshotManager manager) boolean
tableCalculationChanged
(KEY_TYPE key, VALUE_TYPE value) Updates the local table with the specified calculation.boolean
void
protected abstract boolean
updateState
(KEY_TYPE key, VALUE_TYPE value) Update the state for a given column selection.
-
Field Details
-
tableMapHandle
-
-
Constructor Details
-
SwappableTable
Creates a SwappableTable instance with thetableHandle
.- Parameters:
tableMapHandle
- holds the table
-
-
Method Details
-
getTableMapHandle
Gets theTableHandle
for this SwappableTable.- Returns:
- this SwappableTable's
TableHandle
-
addColumn
Adds a column to the underlying table structures.- Parameters:
column
- column
-
getTableDefinition
Gets the signature (columns and types) of the table, \even if the data is transformed.- Returns:
- table with the columns and types of the final table
-
updateState
Update the state for a given column selection.- Parameters:
key
- key for table calculationvalue
- value for table calculation- Returns:
- whether this table should recompute
-
computeRemoteTable
Computes the remote table.- Returns:
- computed remote table
-
tableCalculationChanged
Updates the local table with the specified calculation.- Parameters:
key
- keyvalue
- value- Returns:
- true if the table calculation changed
-
invokeRecompute
protected void invokeRecompute() -
getFriendlyName
Get a readable name for use with threads/logs etc.- Returns:
- a name to use
-
localRecomputeComplete
protected abstract void localRecomputeComplete() -
setManager
-
getManager
-
getReplicatedTableSnapshot
-
freezeSnapshots
public void freezeSnapshots() -
thawSnapshots
public boolean thawSnapshots() -
getSnapshotData
-
addLocalTableUpdateListener
Adds a listener to the update list. Thelistener
will be notified of local table updates.- Parameters:
listener
- listener- Returns:
- current local table
-
removeLocalTableUpdateListener
Removes a listener to the update list.- Parameters:
listener
- listener
-
addDataChangeListener
Adds a listener to the update list. Thelistener
will be notified of data changes.- Parameters:
listener
- listener
-
unsubscribeLocalTable
public void unsubscribeLocalTable() -
maybeInitializeTransient
protected void maybeInitializeTransient() -
beginBatchUpdate
protected void beginBatchUpdate() -
endBatchUpdate
protected void endBatchUpdate()
-