Class KeyedArrayBackedMutableTable

All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable, LiveTable, NotificationQueue.Dependency, Deflatable<Table>, Table, LivenessManager, LivenessNode, LivenessReferent, LongSizedDataStructure, DynamicNode, DynamicTable, NotificationStepReceiver, NotificationStepSource, SystemicObject, Serializable, Runnable

public class KeyedArrayBackedMutableTable
extends UpdatableTable
An in-memory table that has keys for each row, which can be updated on the LTM. This is used to implement in-memory editable table columns from web plugins.
See Also:
Serialized Form
  • Field Details

  • Method Details

    • make

      public static KeyedArrayBackedMutableTable make​(@NotNull TableDefinition definition, String... keyColumnNames)
      Create an empty KeyedArrayBackedMutableTable.
      Parameters:
      definition - the definition of the table to create
      keyColumnNames - the name of the key columns
      Returns:
      an empty KeyedArrayBackedMutableTable with the given definition and key columns
    • make

      public static KeyedArrayBackedMutableTable make​(@NotNull TableDefinition definition, Map<String,​Object[]> enumValues, String... keyColumnNames)
      Create an empty KeyedArrayBackedMutableTable.
      Parameters:
      definition - the definition of the table to create
      enumValues - a map of column names to enumeration values
      keyColumnNames - the name of the key columns
      Returns:
      an empty KeyedArrayBackedMutableTable with the given definition and key columns
    • make

      public static KeyedArrayBackedMutableTable make​(Table initialTable, String... keyColumnNames)
      Create an empty KeyedArrayBackedMutableTable. The initialTable is processed in order, so if there are duplicate keys only the last row is reflected in the output.
      Parameters:
      initialTable - the initial values to copy into the KeyedArrayBackedMutableTable
      keyColumnNames - the name of the key columns
      Returns:
      an empty KeyedArrayBackedMutableTable with the given definition and key columns
    • make

      public static KeyedArrayBackedMutableTable make​(Table initialTable, Map<String,​Object[]> enumValues, String... keyColumnNames)
      Create an empty KeyedArrayBackedMutableTable. The initialTable is processed in order, so if there are duplicate keys only the last row is reflected in the output.
      Parameters:
      initialTable - the initial values to copy into the KeyedArrayBackedMutableTable
      enumValues - a map of column names to enumeration values
      keyColumnNames - the name of the key columns
      Returns:
      an empty KeyedArrayBackedMutableTable with the given definition and key columns
    • processPendingTable

      protected void processPendingTable​(Table table, boolean allowEdits, UpdatableTable.IndexChangeRecorder indexChangeRecorder, Consumer<String> errorNotifier)
    • processPendingDelete

      protected void processPendingDelete​(Table table, UpdatableTable.IndexChangeRecorder indexChangeRecorder)
    • getDefaultDescription

      protected String getDefaultDescription()
    • makeColumnSourceMap

      protected static Map<String,​? extends ArrayBackedColumnSource<?>> makeColumnSourceMap​(TableDefinition definition)
    • setDescription

      public com.illumon.iris.db.v2.utils.BaseArrayBackedMutableTable setDescription​(String newDescription)
    • refresh

      public void refresh()
      Description copied from interface: LiveTable
      Refresh this LiveTable.
      Specified by:
      refresh in interface LiveTable
      Overrides:
      refresh in class UpdatableTable