Class FirestoreSessionStoreOptions
java.lang.Object
com.google.genkit.plugins.firebase.session.FirestoreSessionStoreOptions
Configuration for
FirestoreSessionStore.
Mirrors the upstream Go/JS Firestore session store options. The store derives three Firestore
collection roots from getCollection():
<collection>— one document per snapshot (checkpoint or diff metadata).<collection>-shards— sharded checkpoint state JSON.<collection>-pointers— per-session pointer to the current leaf snapshot.
All three are namespaced under a per-tenant prefix derived from getSnapshotPathPrefix() (default "global").
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault number of turns between full checkpoints.static final StringDefault top-level collection name.static final intDefault shard size in bytes for checkpoint state (512 KiB). -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new builder.static FirestoreSessionStoreOptionsdefaults()Returns default options.intReturns the number of turns between full checkpoints (default 25).Returns the top-level collection name (default "genkit-sessions").intReturns the shard size in bytes for checkpoint state (default 524288).Returns the function that derives the per-tenant path prefix from the per-request store options (defaulto -> "global").
-
Field Details
-
DEFAULT_COLLECTION
Default top-level collection name.- See Also:
-
DEFAULT_CHECKPOINT_INTERVAL
public static final int DEFAULT_CHECKPOINT_INTERVALDefault number of turns between full checkpoints.- See Also:
-
DEFAULT_SHARD_SIZE
public static final int DEFAULT_SHARD_SIZEDefault shard size in bytes for checkpoint state (512 KiB).- See Also:
-
-
Method Details
-
getCollection
Returns the top-level collection name (default "genkit-sessions").- Returns:
- the collection name
-
getCheckpointInterval
public int getCheckpointInterval()Returns the number of turns between full checkpoints (default 25).- Returns:
- the checkpoint interval
-
getShardSize
public int getShardSize()Returns the shard size in bytes for checkpoint state (default 524288).- Returns:
- the shard size in bytes
-
getSnapshotPathPrefix
Returns the function that derives the per-tenant path prefix from the per-request store options (defaulto -> "global").- Returns:
- the prefix function
-
defaults
Returns default options.- Returns:
- a
FirestoreSessionStoreOptionswith all defaults
-
builder
Creates a new builder.- Returns:
- a new builder
-