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. IncrementalChunkedOperatorAggregationStateManagerOpenAddressedBase 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> @NotNull 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 @NotNull String packageName(HasherConfig<?> hasherConfig)
    • hasherName

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

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

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

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