PendingLocalStateStore Class
A Map-like store for managing pending local container states from attached containers. Optimizes storage by deduplicating shared resources across stored states.
This API is provided for existing users, but is not recommended for new users.
To use, import via @fluidframework/container-loader/legacy.
For more information about our API support guarantees, see here.
Signature
export declare class PendingLocalStateStore<TKey>
Type Parameters
| Parameter | Description |
|---|---|
| TKey | The type of keys used to identify stored states |
Remarks
Only use with attached containers from the same URL. Only store strings returned by container.getPendingLocalState().
Example
const store = new PendingLocalStateStore<string>();
// Store pending state
const pendingState = await attachedContainer.getPendingLocalState();
store.set("session1", pendingState);
// Load from stored state
const restored = store.get("session1");
const newContainer = await loadFrozenContainerFromPendingState({
pendingLocalState: restored,
// ... other loader options
});
Properties
| Property | Alerts | Modifiers | Type | Description |
|---|---|---|---|---|
| size | Alpha |
readonly |
number | Gets the number of stored pending states. |
Property Details
size
Gets the number of stored pending states.
This API is provided for existing users, but is not recommended for new users.
For more information about our API support guarantees, see here.
Signature
get size(): number;
Type: number