UpdateSeq¶
-
class UpdateSeq¶
This is a sequence number that increments monotonically. It can be used to track cache updates, or serve as a kind of timestamp for any changing properties.
A special class is used instead of simply an int, so we can elegantly handle such things as wraparound and special cases. There are two special cases. Firstly, a sequence number is ‘initial’ when it is first created. This sequence is older than any other sequence number. Secondly, a sequence number may be explicitly set to ‘old’. This is older than any other sequence number except ‘initial’. Finally, we have the explicit number ‘fresh’, which is newer than any other sequence number. All other sequences are numeric and are monotonically increasing.
Inheritance diagram
digraph inheritanceaaca86a123 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "UpdateSeq" [URL="acron.core.UpdateSeq.html#acron.core.UpdateSeq",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "UpdateSeq" [arrowsize=0.75,style=""]; }- UpdateSeq.__eq__()¶
- UpdateSeq.__ge__()¶
- UpdateSeq.__gt__()¶
- UpdateSeq.__init__()¶
Creates an
UpdateSeqin the given state.Creates an
UpdateSeqin the ‘initial’ state.
- UpdateSeq.__le__()¶
- UpdateSeq.__lt__()¶
- UpdateSeq.__ne__()¶
- UpdateSeq.assign()¶
- static UpdateSeq.fresh()¶
- UpdateSeq.get_seq()¶
Returns the internal integer value associated with the
UpdateSeq. Useful for debugging only.
- UpdateSeq.increment()¶
- UpdateSeq.increment()¶
- static UpdateSeq.initial()¶
- UpdateSeq.is_special()¶
Returns true if the
UpdateSeqis in any special states, i.e. ‘initial’, ‘old’, or ‘fresh’.
- static UpdateSeq.old()¶
- UpdateSeq.output()¶