ChangeableMap<'K, 'V> Type
A changeable map: the writable source of an adaptive map. Reads and writes are confined to the owner thread. See ChangeableSet<'T> for the transaction and view contracts.
Constructors
| Constructor |
Description
|
Full Usage:
ChangeableMap(initial)
Parameters:
('K * 'V) seq
Returns: ChangeableMap<'K, 'V>
|
|
Instance members
| Instance member |
Description
|
Full Usage:
this.AddOrUpdate
Parameters:
'K
valueToSet : 'V
|
Adds or updates an entry. No-op when the value is unchanged.
|
Full Usage:
this.PostAddOrUpdate
Parameters:
'K
valueToSet : 'V
|
Posts an add or update. Safe from any thread: the operation is queued
and returns immediately. The owner thread applies the queued
operations at the next graph operation (reads and writes auto-drain)
or at
Example
val view: obj
|
Full Usage:
this.PostClear
|
Posts a clear (a full replace with the empty map). Safe from any thread. See PostAddOrUpdate for the application contract. Example
|
Full Usage:
this.PostRemove
Parameters:
'K
|
Posts a remove. Safe from any thread. See PostAddOrUpdate for the application contract.
Example
|
Full Usage:
this.PostSet
Parameters:
('K * 'V) seq
|
Posts a full replace. Safe from any thread. See PostAddOrUpdate for the application contract; a posted replace supersedes the other ops of the same pending batch (the transaction semantics of Set).
Example
Multiple items
module Map from Microsoft.FSharp.Collections -------------------- type Map<'Key,'Value (requires comparison)> = interface IReadOnlyDictionary<'Key,'Value> interface IReadOnlyCollection<KeyValuePair<'Key,'Value>> interface IEnumerable interface IStructuralEquatable interface IComparable interface IEnumerable<KeyValuePair<'Key,'Value>> interface ICollection<KeyValuePair<'Key,'Value>> interface IDictionary<'Key,'Value> new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> member Add: key: 'Key * value: 'Value -> Map<'Key,'Value> ... -------------------- new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> val toSeq: table: Map<'Key,'T> -> ('Key * 'T) seq (requires comparison)
val ofList: elements: ('Key * 'T) list -> Map<'Key,'T> (requires comparison)
|
Full Usage:
this.Remove
Parameters:
'K
|
Removes an entry. No-op when absent.
|
Full Usage:
this.Set
Parameters:
('K * 'V) seq
|
Replaces the whole map. Supersedes the whole batch inside a transaction (later writes of the batch are discarded; matches the list, docs/ALIST-DESIGN.md ยง3.3).
|
Mibo