Class: AddName
Defined in: | lib/Types/StructuredTypes.coffee |
Inherits: | types.Operation |
Overview
When a new property in a map manager is created, then the uids of the inserted Operations must be unique (think about concurrent operations). Therefore only an AddName operation is allowed to add a property in a MapManager. If two AddName operations on the same MapManager name happen concurrently only one will AddName operation will be executed.
Instance Method Summary
- # (void) execute() If map_manager doesn't have the property name, then add it.
- # (void) _encode() Encode this operation in such a way that it can be parsed by remote peers.
Constructor Details
#
(void)
constructor(uid, map_manager, name)
Instance Method Details
#
(void)
execute()
If map_manager doesn't have the property name, then add it. The ReplaceManager that is being written on the property is unique in such a way that if AddName is executed (from another peer) it will always have the same result (ReplaceManager, and its beginning and end are the same)
#
(void)
_encode()
Encode this operation in such a way that it can be parsed by remote peers.