Class CosmosSessionStoreOptions.Builder
java.lang.Object
com.google.genkit.plugins.azurefoundry.session.CosmosSessionStoreOptions.Builder
- Enclosing class:
CosmosSessionStoreOptions
Builder for
CosmosSessionStoreOptions.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newCosmosSessionStoreOptions.checkpointInterval(int checkpointInterval) Sets the number of turns between full checkpoints.containerName(String containerName) Sets the Cosmos DB container name.createIfNotExists(boolean createIfNotExists) Sets whether to create the database and container on first use if they do not exist.databaseName(String databaseName) Sets the Cosmos DB database name.pollIntervalMs(long pollIntervalMs) Sets the subscription poll interval in milliseconds.shardSize(int shardSize) Sets the shard size in bytes for checkpoint state (must stay under the 2 MB document cap).snapshotPathPrefix(Function<SessionStoreOptions, String> snapshotPathPrefix) Sets the function that derives the per-tenant partition-key prefix.
-
Method Details
-
databaseName
Sets the Cosmos DB database name.- Parameters:
databaseName- the database name- Returns:
- this builder
-
containerName
Sets the Cosmos DB container name.- Parameters:
containerName- the container 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 (must stay under the 2 MB document cap).- Parameters:
shardSize- the shard size in bytes (must be>= 1)- Returns:
- this builder
-
snapshotPathPrefix
public CosmosSessionStoreOptions.Builder snapshotPathPrefix(Function<SessionStoreOptions, String> snapshotPathPrefix) Sets the function that derives the per-tenant partition-key prefix.- Parameters:
snapshotPathPrefix- the prefix function- Returns:
- this builder
-
createIfNotExists
Sets whether to create the database and container on first use if they do not exist.- Parameters:
createIfNotExists- whether to create the database/container 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 newCosmosSessionStoreOptions.- Returns:
- a new options instance
-