Class PostgresSessionStoreOptions.Builder

java.lang.Object
com.google.genkit.plugins.postgresql.session.PostgresSessionStoreOptions.Builder
Enclosing class:
PostgresSessionStoreOptions

public static final class PostgresSessionStoreOptions.Builder extends Object
  • Method Details

    • tableName

      public PostgresSessionStoreOptions.Builder tableName(String tableName)
      Sets the PostgreSQL table name.
      Parameters:
      tableName - the table name
      Returns:
      this builder
    • checkpointInterval

      public PostgresSessionStoreOptions.Builder checkpointInterval(int checkpointInterval)
      Sets the number of turns between full checkpoints.
      Parameters:
      checkpointInterval - the checkpoint interval (must be >= 1)
      Returns:
      this builder
    • shardSize

      public PostgresSessionStoreOptions.Builder shardSize(int shardSize)
      Sets the shard size in bytes for checkpoint state.
      Parameters:
      shardSize - the shard size in bytes (must be >= 1)
      Returns:
      this builder
    • snapshotPathPrefix

      public PostgresSessionStoreOptions.Builder snapshotPathPrefix(Function<SessionStoreOptions,String> snapshotPathPrefix)
      Sets the function that derives the per-tenant prefix.
      Parameters:
      snapshotPathPrefix - the prefix function
      Returns:
      this builder
    • createTableIfNotExists

      public PostgresSessionStoreOptions.Builder createTableIfNotExists(boolean createTableIfNotExists)
      Sets whether to create the table on first use if it does not exist.
      Parameters:
      createTableIfNotExists - whether to create the table when missing
      Returns:
      this builder
    • pollIntervalMs

      public PostgresSessionStoreOptions.Builder pollIntervalMs(long pollIntervalMs)
      Sets the subscription poll interval in milliseconds.
      Parameters:
      pollIntervalMs - the poll interval (must be >= 1)
      Returns:
      this builder
    • build

      Builds a new PostgresSessionStoreOptions.
      Returns:
      a new options instance