Create a new restorable pool.
The instantiation options for a restorable pool.
Private
_addedPrivate
_currentPrivate
_currentPrivate
_hasPrivate
_isPrivate
_objectsPrivate
_onClean up after disposed objects.
Private
_restorePrivate
_restoredPrivate
_updatedReadonly
namespaceA namespace for all tracked objects.
The current object.
The restorable pool does not set current
. It is intended for client use.
If current
is set to an object that does not exist in the pool, it is a
no-op.
The current object.
Test whether the pool is disposed.
The number of objects held by the pool.
Add a new object to the pool.
The object object being added.
The object passed into the pool is added synchronously; its existence in
the pool can be checked with the has()
method. The promise this method
returns resolves after the object has been added and saved to an underlying
restoration connector, if one is available.
Dispose of the resources held by the pool.
Disposing a pool does not affect the underlying data in the data connector, it simply disposes the client-side pool without making any connector calls.
Restore the objects in this pool's namespace.
The configuration options that describe restoration.
A promise that resolves when restoration has completed.
This function should almost never be invoked by client code. Its primary use case is to be invoked by a layout restorer plugin that handles multiple restorable pools and, when ready, asks them each to restore their respective objects.
Generated using TypeDoc
An object pool that supports restoration.
Typeparam
T - The type of object being tracked.