Class MongoSessionStoreOptions.Builder

java.lang.Object
com.google.genkit.plugins.mongodb.session.MongoSessionStoreOptions.Builder
Enclosing class:
MongoSessionStoreOptions

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

    • databaseName

      public MongoSessionStoreOptions.Builder databaseName(String databaseName)
      Sets the MongoDB database name.
      Parameters:
      databaseName - the database name
      Returns:
      this builder
    • collectionName

      public MongoSessionStoreOptions.Builder collectionName(String collectionName)
      Sets the MongoDB collection name.
      Parameters:
      collectionName - the collection name
      Returns:
      this builder
    • checkpointInterval

      public MongoSessionStoreOptions.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 MongoSessionStoreOptions.Builder shardSize(int shardSize)
      Sets the shard size in bytes for checkpoint state (must stay under the 16 MB document cap).
      Parameters:
      shardSize - the shard size in bytes (must be >= 1)
      Returns:
      this builder
    • snapshotPathPrefix

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

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

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