Skip to content

Commit 594de38

Browse files
committed
WIP - clarify the update object returned after replacing the internal data for LiveMap or LiveCounter in RTLC6 and RTLM6
1 parent d936ca2 commit 594de38

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

textile/objects-features.textile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ h3(#livecounter). LiveCounter
304304
** @(RTLC6d)@ If @ObjectState.createOp@ is present, merge the initial value into the @LiveCounter@ as described in "RTLC10":#RTLC10, passing in the @ObjectState.createOp@ instance
305305
*** @(RTLC6d1)@ This clause has been replaced by "RTLC10a":#RTLC10a
306306
*** @(RTLC6d2)@ This clause has been replaced by "RTLC10b":#RTLC10b
307+
** @(RTLC6g)@ Return a @LiveCounterUpdate@ object that reflects the change in value caused by applying "RTLC6":#RTLC6. Construct the update using the procedure defined in "RTLC12":#RTLC12, passing in the @previous@ @data@ value that the @LiveCounter@ had before applying "RTLC6":#RTLC6, and the @new@ @data@ value that the @LiveCounter@ has after applying "RTLC6d":#RTLC6d
307308
* @(RTLC7)@ An @ObjectOperation@ from @ObjectMessage.operation@ can be applied to a @LiveCounter@ by performing the following actions in order:
308309
** @(RTLC7a)@ A client library may choose to implement this logic as a convenience method named @applyOperation@, which accepts an @ObjectMessage@ instance with an existing @ObjectMessage.operation@ object, with @ObjectMessage.operation.objectId@ matching the Object ID of this @LiveCounter@. This @ObjectMessage@ represents the operation to be applied to this @LiveCounter@
309310
** @(RTLC7b)@ If @ObjectMessage.operation@ cannot be applied based on the result of "@LiveObject.canApplyOperation@":#RTLO4a, log a debug or trace message indicating that the operation cannot be applied because its serial value is not newer than the object's, and discard the @ObjectMessage@ without taking any further action
@@ -336,6 +337,12 @@ h3(#livecounter). LiveCounter
336337
** @(RTLC10b)@ Set the private flag @createOperationIsMerged@ to @true@
337338
** @(RTLC10c)@ If @ObjectOperation.counter.count@ exists, return a @LiveCounterUpdate@ object with @LiveCounterUpdate.update.amount@ set to @ObjectOperation.counter.count@
338339
** @(RTLC10d)@ If @ObjectOperation.counter.count@ does not exist, return a @LiveCounterUpdate@ object with @LiveCounterUpdate.noop@ set to @true@
340+
* @(RTLC12)@ A @LiveCounterUpdate@ for the difference between two @LiveCounter@ @data@ values (referred to as "previous" and "new" values) can be created using the convenience method:
341+
** @(RTLC12a)@ Expects the following arguments:
342+
*** @(RTLC12a1)@ @previous@ number
343+
*** @(RTLC12a2)@ @new@ number
344+
** @(RTLC12b)@ The return type is a @LiveCounterUpdate@ object, which indicates the data update for this @LiveCounter@
345+
** @(RTLC12c)@ Return a @LiveCounterUpdate@ object with @LiveCounterUpdate.update.amount@ equal to the difference between the @new@ and @previous@ values
339346

340347
h3(#livemap). LiveMap
341348

@@ -439,6 +446,7 @@ h3(#livemap). LiveMap
439446
**** @(RTLM6d1a)@ This clause has been replaced by "RTLM17a1":#RTLM17a1
440447
**** @(RTLM6d1b)@ This clause has been replaced by "RTLM17a2":#RTLM17a2
441448
*** @(RTLM6d2)@ This clause has been replaced by "RTLM17b":#RTLM17b
449+
** @(RTLM6g)@ Return a @LiveMapUpdate@ object that reflects the change in value caused by applying "RTLM6":#RTLM6. Construct the update using the procedure defined in "RTLM22":#RTLM22, passing in the @previous@ @data@ value that the @LiveMap@ had before applying "RTLM6":#RTLM6, and the @new@ @data@ value that the @LiveMap@ has after applying "RTLM6d":#RTLM6d
442450
* @(RTLM15)@ An @ObjectOperation@ from @ObjectMessage.operation@ can be applied to a @LiveMap@ by performing the following actions in order:
443451
** @(RTLM15a)@ A client library may choose to implement this logic as a convenience method named @applyOperation@, which accepts an @ObjectMessage@ instance with an existing @ObjectMessage.operation@ object, with @ObjectMessage.operation.objectId@ matching the Object ID of this @LiveMap@. This @ObjectMessage@ represents the operation to be applied to this @LiveMap@
444452
** @(RTLM15b)@ If @ObjectMessage.operation@ cannot be applied based on the result of "@LiveObject.canApplyOperation@":#RTLO4a, log a debug or trace message indicating that the operation cannot be applied because its serial value is not newer than the object's, and discard the @ObjectMessage@ without taking any further action
@@ -518,6 +526,12 @@ h3(#livemap). LiveMap
518526
* @(RTLM19)@ The @LiveMap@ can be checked to determine whether it should release resources for its tombstoned @ObjectsMapEntry@ entries as follows:
519527
** @(RTLM19a)@ For each @ObjectsMapEntry@ in the internal @data@:
520528
*** @(RTLM19a1)@ If @ObjectsMapEntry.tombstone@ is @true@, and the difference between the current time and @ObjectsMapEntry.tombstonedAt@ is greater than or equal to the "grace period":#RTO10b, remove the entry from the internal @data@ map and release resources for the corresponding @ObjectsMapEntry@ entity to allow it to be garbage collected
529+
* @(RTLM22)@ A @LiveMapUpdate@ for the difference between two @LiveMap@ @data@ values (referred to as "previous" and "new" values) can be created using the convenience method:
530+
** @(RTLM22a)@ Expects the following arguments:
531+
*** @(RTLM22a1)@ @previous@ @Dict<String, ObjectsMapEntry>@
532+
*** @(RTLM22a2)@ @new@ @Dict<String, ObjectsMapEntry>@
533+
** @(RTLM22b)@ The return type is a @LiveMapUpdate@ object, which indicates the data update for this @LiveMap@
534+
** @(RTLM22c)@ TODO
521535

522536
h2(#idl). Interface Definition
523537

0 commit comments

Comments
 (0)