Class CosmosSessionStoreOptions.Builder

java.lang.Object
com.google.genkit.plugins.azurefoundry.session.CosmosSessionStoreOptions.Builder
Enclosing class:
CosmosSessionStoreOptions

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

    • databaseName

      public CosmosSessionStoreOptions.Builder databaseName(String databaseName)
      Sets the Cosmos DB database name.
      Parameters:
      databaseName - the database name
      Returns:
      this builder
    • containerName

      public CosmosSessionStoreOptions.Builder containerName(String containerName)
      Sets the Cosmos DB container name.
      Parameters:
      containerName - the container name
      Returns:
      this builder
    • checkpointInterval

      public CosmosSessionStoreOptions.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 CosmosSessionStoreOptions.Builder shardSize(int 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

      public CosmosSessionStoreOptions.Builder createIfNotExists(boolean 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

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

      public CosmosSessionStoreOptions build()
      Builds a new CosmosSessionStoreOptions.
      Returns:
      a new options instance