]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2856] Include the state transition diagram
authorMukund Sivaraman <muks@isc.org>
Thu, 11 Jul 2013 09:17:08 +0000 (14:47 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 11 Jul 2013 09:17:08 +0000 (14:47 +0530)
src/lib/python/isc/memmgr/datasrc_info.py

index 2846302934247b8d5823cd61728b0f9ce005c8f5..61b6474fcd9819575d58a15d873563b72e2eaa81 100644 (file)
@@ -33,10 +33,17 @@ class SegmentInfo:
     segment-type specific details.  Such details are expected to be
     delegated to subclasses corresponding to specific types of segments.
 
-    The implementation is still incomplete.  It will have more attributes
-    such as a set of current readers, methods for adding or deleting
-    the readers.  These will probably be implemented in this base class
-    as they will be independent from segment-type specific details.
+    A summarized (and simplified) state transition diagram (for __state)
+    would be as follows:
+                                                +--sync_reader()/remove_reader()
+                                                |  still have old readers
+                                                |          |
+                UPDATING-----complete_--->SYNCHRONIZING<---+
+                  ^          update()           |
+    start_update()|                             | sync_reader()/remove_reader()
+    events        |                             V no more old reader
+    exist       READY<------complete_----------COPYING
+                            update()
 
     """
     # Common constants of user type: reader or writer
@@ -57,6 +64,8 @@ class SegmentInfo:
               # handle further updates (e.g., from xfrin).
 
     def __init__(self):
+        # Holds the state of SegmentInfo. See the class description
+        # above for the state transition diagram.
         self.__state = self.READY
         # __readers is a set of 'reader_session_id' private to
         # SegmentInfo. It consists of the (ID of) reader modules that