@fluid-experimental/attributable-map v2.0.0-dev.4.1.0.148229
@fluid-experimental/attributable-map
Overview
This experimental DDS is a copy of SharedMap
which additionally tracks attribution information, such as the user who made an update and the timestamp of the change. Please refer to the description of attributor for more details.
SharedMap
The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting and retrieving values that JavaScript developers are accustomed to with the Map built-in object.
Creation
To create a SharedMap
, call the static create method:
const myMap = SharedMap.create(this.runtime, id);
Usage
Unlike the JavaScript Map
, a SharedMap
's keys must be strings. The value must only be plain JS objects or handles (e.g. to another DDS or Fluid objects).
In collaborative scenarios, the value is settled with a policy of last write wins.
.wait()
SharedMap
has a wait
method in addition to the normal get
, which returns a Promise
that resolves to the value
when the key becomes available.
Eventing
SharedMap
is an EventEmitter
, and will emit events when other clients make modifications. You should register for these events and respond appropriately as the data is modified. valueChanged
will be emitted in response to a set
or delete
, and provide the key and previous value that was stored at that key. clear
will be emitted in response to a clear
.
2 days ago
7 days ago
8 days ago
9 days ago
19 days ago
19 days ago
23 days ago
23 days ago
27 days ago
29 days ago
29 days ago
29 days ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
10 months ago
9 months ago
9 months ago
9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
6 months ago
6 months ago
9 months ago
6 months ago
10 months ago
11 months ago
10 months ago
7 months ago
10 months ago
10 months ago
7 months ago
8 months ago
6 months ago
10 months ago
7 months ago
7 months ago
7 months ago
6 months ago
6 months ago
7 months ago
6 months ago
6 months ago
9 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
9 months ago
8 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
12 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago