Class TypedHasherFactory

java.lang.Object
io.deephaven.engine.table.impl.by.typed.TypedHasherFactory

public class TypedHasherFactory
extends Object
Produces typed hashers (e.g. byte * object * float * double * int) on-demand or using a set of pregenerated and precompiled hashers for singleton and pairs of types.
  • Constructor Details

    • TypedHasherFactory

      public TypedHasherFactory()
  • Method Details

    • make

      public static <T> T make​(Class<T> baseClass, ColumnSource<?>[] tableKeySources, ColumnSource<?>[] originalKeySources, int tableSize, double maximumLoadFactor, double targetLoadFactor)
      Produce a hasher for the given base class and column sources.
      Type Parameters:
      T - the base class
      Parameters:
      baseClass - the base class (e.g. StaticChunkedOperatorAggregationStateManagerTypedBase that the generated hasher extends from
      tableKeySources - the key sources
      originalKeySources -
      tableSize - the initial table size
      maximumLoadFactor - the maximum load factor of the for the table
      targetLoadFactor - the load factor that we will rehash to
      Returns:
      an instantiated hasher
    • hasherConfigForBase

      @NotNull public static <T> HasherConfig<T> hasherConfigForBase​(Class<T> baseClass)
    • make

      public static <T> T make​(HasherConfig<T> hasherConfig, ColumnSource<?>[] tableKeySources, ColumnSource<?>[] originalKeySources, int tableSize, double maximumLoadFactor, double targetLoadFactor)
      Produce a hasher for the given base class and column sources.
      Type Parameters:
      T - the base class
      Parameters:
      hasherConfig - the configuration of the class to generate
      tableKeySources - the key sources
      tableSize - the initial table size
      maximumLoadFactor - the maximum load factor of the for the table
      targetLoadFactor - the load factor that we will rehash to
      Returns:
      an instantiated hasher
    • packageName

      @NotNull public static String packageName​(HasherConfig<?> hasherConfig)
    • hasherName

      @NotNull public static String hasherName​(HasherConfig<?> hasherConfig, ChunkType[] chunkTypes)
    • generateHasher

      @NotNull public static <T> com.squareup.javapoet.JavaFile generateHasher​(HasherConfig<T> hasherConfig, ChunkType[] chunkTypes, String className, Optional<Modifier> visibility)
    • getEqualsStatement

      @NotNull public static String getEqualsStatement​(ChunkType[] chunkTypes)
    • getEqualsStatementAlternate

      @NotNull public static String getEqualsStatementAlternate​(ChunkType[] chunkTypes)
    • getEqualsStatementOverflow

      @NotNull public static String getEqualsStatementOverflow​(ChunkType[] chunkTypes)