Class MongoSessionStoreOptions.Builder
java.lang.Object
com.google.genkit.plugins.mongodb.session.MongoSessionStoreOptions.Builder
- Enclosing class:
MongoSessionStoreOptions
Builder for
MongoSessionStoreOptions.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newMongoSessionStoreOptions.checkpointInterval(int checkpointInterval) Sets the number of turns between full checkpoints.collectionName(String collectionName) Sets the MongoDB collection name.databaseName(String databaseName) Sets the MongoDB 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 16 MB document cap).snapshotPathPrefix(Function<SessionStoreOptions, String> snapshotPathPrefix) Sets the function that derives the per-tenant prefix.
-
Method Details
-
databaseName
Sets the MongoDB database name.- Parameters:
databaseName- the database name- Returns:
- this builder
-
collectionName
Sets the MongoDB collection name.- Parameters:
collectionName- the collection 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 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
Sets the subscription poll interval in milliseconds.- Parameters:
pollIntervalMs- the poll interval (must be>= 1)- Returns:
- this builder
-
build
Builds a newMongoSessionStoreOptions.- Returns:
- a new options instance
-