Class PostgresSessionStoreOptions.Builder
java.lang.Object
com.google.genkit.plugins.postgresql.session.PostgresSessionStoreOptions.Builder
- Enclosing class:
PostgresSessionStoreOptions
Builder for
PostgresSessionStoreOptions.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newPostgresSessionStoreOptions.checkpointInterval(int checkpointInterval) Sets the number of turns between full checkpoints.createTableIfNotExists(boolean createTableIfNotExists) Sets whether to create the table on first use if it does not exist.pollIntervalMs(long pollIntervalMs) Sets the subscription poll interval in milliseconds.shardSize(int shardSize) Sets the shard size in bytes for checkpoint state.snapshotPathPrefix(Function<SessionStoreOptions, String> snapshotPathPrefix) Sets the function that derives the per-tenant prefix.Sets the PostgreSQL table name.
-
Method Details
-
tableName
Sets the PostgreSQL table name.- Parameters:
tableName- the table name- Returns:
- this builder
-
checkpointInterval
Sets the number of turns between full checkpoints.- Parameters:
checkpointInterval- the checkpoint interval (must be>= 1)- Returns:
- this builder
-
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
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
Sets the subscription poll interval in milliseconds.- Parameters:
pollIntervalMs- the poll interval (must be>= 1)- Returns:
- this builder
-
build
Builds a newPostgresSessionStoreOptions.- Returns:
- a new options instance
-