class Pf::Map::Commit(K, V)
- Pf::Map::Commit(K, V)
- Reference
- Object
Overview
Commits allow you to compose multiple edits into one, big edit of the map. Thus you avoid creating many useless intermediate copies of the map.
Defined in:
permafrost/map.crInstance Method Summary
-
#[](key : K) : V
Runs
Map#[]
on the map built so far. -
#[]?(key : K) : V | Nil
Runs
Map#[]?
on the map built so far. -
#assoc(key : K, value : V) : self
Commits the association between key and value to the map.
-
#dissoc(key : K) : self
Commits the removal of an association between key and value from the map.
-
#includes?(object) : Bool
Runs
Map#includes?
on the map built so far. -
#size : Int32
Runs
Map#size
on the map built so far.
Instance Method Detail
Commits the association between key and value to the map.
Raises ResolvedError
if this commit is used outside of the transaction
(see Map#transaction
) that produced it.
Raises ReadonlyError
if called by a fiber other than the fiber that
initiated the transaction.
Commits the removal of an association between key and value from the map.
Raises ResolvedError
if this commit is used outside of the transaction
(see Map#transaction
) that produced it.
Raises ReadonlyError
if called by a fiber other than the fiber that
initiated the transaction.