Class ColumnPreviewManager

java.lang.Object
io.deephaven.engine.table.impl.preview.ColumnPreviewManager

public class ColumnPreviewManager extends Object
Converts large data types to Preview types. Also wraps non-serializable data types to be serializable.
  • Constructor Details

    • ColumnPreviewManager

      public ColumnPreviewManager()
  • Method Details

    • addPreview

      public static <S, D extends PreviewType> void addPreview(Class<S> sourceType, Class<D> destType, Function<S,D> function)
      Adds a data type to be converted to a Preview Type.
      Type Parameters:
      S - the source type
      D - the destination type
      Parameters:
      sourceType - the type to convert
      destType - the Preview type to convert to
      function - the function that applies the conversion
    • applyPreview

      public static Table applyPreview(Table table)
      Iterates over a tables columns and applies a preview (or wraps non-serializable).
      Parameters:
      table - the table to apply the preview
      Returns:
      the table containing the preview columns
    • isColumnTypeDisplayable

      public static boolean isColumnTypeDisplayable(Class<?> type)
      Indicates if a column type is displayable by the client. This is used to screen out unknown classes, unserializable, and anything else that should not be displayed.
      Parameters:
      type - the column type
      Returns:
      true if the type can be displayed by the client, false otherwise.
    • isOnWhiteList

      public static boolean isOnWhiteList(Class<?> type)
      Indicates if a type is on the white list created from user defined properties.
      Parameters:
      type - the class type
      Returns:
      true if it is on the white list, false otherwise