Revision c22d21ad doc/activitydiagrams/subscriber/urtSubscriberFetchLatestMessage.uml

View differences:

doc/activitydiagrams/subscriber/urtSubscriberFetchLatestMessage.uml
48 48

  
49 49
:lock topic;
50 50
if (Is HRT subscriber?) then (yes)
51
  :lock next message;
51
  :access next message;
52 52
else (no)
53 53
  if (Has a message been read before?) then (yes)
54
    :lock last read message;
54
    :access last read message;
55 55
    if (Message timestamp equals local copy?) then (yes)
56 56
    else (no)
57 57
      partition "find oldest valid message" {
58
        :lock next message;
59
        note: Locked two messages ahead.
58
        :access next message;
60 59
        while (Timestamp of next is younger than of current?) is (yes)
61
          fork
62
            :unlock current message;
63
          fork again
64
            :lock one message further ahead;
65
          endfork
60
          :iterate by one message;
66 61
        endwhile (no)
67
        :unlock next message;
68
        note: One message still locked.
69 62
      }
70 63
    endif
71 64
  else (no)
72
    :lock message after topic's latest message;
65
    :access message after topic's latest message;
73 66
  endif
74 67
endif
75 68
partition "iterate to latest" {
76
  :lock one message further ahead;
77
  note: Locked two messages ahead.
78 69
  while (Timestamp of next message is younger than of current?) is (yes)
79
    fork
80
      if (Is HRT subscriber?) then (yes)
81
        fork
82
          :decrement HRT counter of current message;
83
        fork again
84
          :update QoS delay timer (@subscriber);
85
        endfork
86
      else (no)
87
      endif
88
      :unlock current message;
89
    fork again
90
      :lock one message further ahead;
91
    endfork
70
    if (Is HRT subscriber?) then (yes)
71
      fork
72
        :decrement HRT counter of current message;
73
      fork again
74
        :update QoS delay timer (@subscriber);
75
      endfork
76
    else (no)
77
    endif
78
    :iterate by one message;
92 79
  endwhile (no)
93
  :unlock next message;
94
  note: One message still locked.
95 80
}
96 81
fork
97 82
  :set last fetched message pointer to locked message;
......
120 105
  else (no)
121 106
  endif
122 107
endfork
123
:unlock message;
124 108
:unlock topic;
125 109

  
126 110
/'### STOP & RETURN ##########################################################'/

Also available in: Unified diff