-
Notifications
You must be signed in to change notification settings - Fork 1
/
nacos.drawio
2321 lines (2321 loc) · 303 KB
/
nacos.drawio
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<mxfile host="Electron" modified="2024-05-02T12:56:23.003Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.6.5 Chrome/114.0.5735.243 Electron/25.3.1 Safari/537.36" etag="OrFaM8nSHoSkXmxi72jr" version="21.6.5" type="device" pages="5">
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Nacos注册中心">
<mxGraphModel dx="3915" dy="842" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="cKh2JxnRFl6GvmQpNupA-267" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;fontSize=8;fontColor=#007FFF;strokeColor=#007FFF;elbow=vertical;dashed=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-240" target="cKh2JxnRFl6GvmQpNupA-243" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="3799" y="220" />
<mxPoint x="1688" y="220" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-95" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=6;fontColor=#007FFF;strokeColor=#007FFF;elbow=vertical;dashed=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-87" target="cKh2JxnRFl6GvmQpNupA-47" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="3460" y="940" />
<mxPoint x="3460" y="990" />
<mxPoint x="2560" y="990" />
<mxPoint x="2560" y="1050" />
<mxPoint x="2481" y="1050" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-164" style="edgeStyle=entityRelationEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0;exitDx=0;exitDy=0;entryX=1;entryY=1;entryDx=0;entryDy=0;fontSize=8;fontColor=#007FFF;strokeColor=#82b366;elbow=vertical;shape=link;width=3.333333333333332;fillColor=#d5e8d4;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-161" target="cKh2JxnRFl6GvmQpNupA-56" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-12" style="edgeStyle=entityRelationEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=1;entryDx=0;entryDy=0;fontSize=10;fontColor=#007FFF;shape=link;elbow=vertical;strokeColor=#33FFFF;width=2;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-33" target="Sf5YBq0qI29CyhUMobhk-0" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-0" target="E0nTntA1szs-sMbRV9SV-2" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-0" value="Client启动" style="ellipse;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="80" y="160" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-1" value="end" style="ellipse;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="80" y="1800" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-14" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-2" target="E0nTntA1szs-sMbRV9SV-13" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-198" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=8;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-2" target="cKh2JxnRFl6GvmQpNupA-196" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-2" value="自动配置<br style="font-size: 10px;">spring-cloud-alibaba-nacos-discovery -&gt;&nbsp;spring.factories" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="50" y="240" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-4" value="<h1>Nacos注册中心(1.4.1)</h1><p>前置知识:<br></p><ul><li>Spring Boot启动流程(如:事件监听机制)、自动配置原理、Spring事件机制</li><li>CopyOnWrite 、LookUp 机制</li><li>Spring Cloud 规范&amp;工作机制(如:BootstrapConfiguration)<br></li><li>Distro一致性协议、Raft一致性协议</li></ul><p></p>" style="text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="40" y="19" width="540" height="141" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-32" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=9;fontColor=#3333FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" target="cKh2JxnRFl6GvmQpNupA-31" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="1340" y="260" as="sourcePoint" />
<Array as="points">
<mxPoint x="1340" y="260" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-6" value="REST<br>API" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;gradientColor=#97d077;strokeColor=#82b366;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1300" y="240" width="40" height="1040" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-16" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-13" target="E0nTntA1szs-sMbRV9SV-15" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-24" value="<span style="font-family: helvetica; font-size: 6px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: center; text-indent: 0px; text-transform: none; word-spacing: 0px; background-color: rgb(248, 249, 250); display: inline; float: none;">创建了3个Bean</span>" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=6;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-13" target="E0nTntA1szs-sMbRV9SV-23" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-13" value="NacosServiceRegistryAutoConfiguration" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="220" y="240" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-18" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-15" target="E0nTntA1szs-sMbRV9SV-17" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-85" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#007FFF;strokeColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-15" target="E0nTntA1szs-sMbRV9SV-84" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-15" value="NacosDiscoveryClient<br>AutoConfiguration" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="230" y="940" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=10;curved=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-17" target="E0nTntA1szs-sMbRV9SV-2" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-91" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;strokeColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-17" target="E0nTntA1szs-sMbRV9SV-90" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-17" value="RibbonNacosAutoConfiguration" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="230" y="1160" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-26" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=6;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-23" target="E0nTntA1szs-sMbRV9SV-25" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-55" style="edgeStyle=entityRelationEdgeStyle;shape=link;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.75;exitDx=0;exitDy=0;entryX=0;entryY=0;entryDx=0;entryDy=0;fontSize=8;fontColor=#FF0080;strokeColor=#82b366;fillColor=#d5e8d4;width=-4;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-23" target="E0nTntA1szs-sMbRV9SV-51" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-23" value="NacosRegistration<br><font color="#007fff" style="font-size: 8px">init()获取部分环境变量存入元数据的Map</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="470" y="240" width="106" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-28" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=6;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-25" target="E0nTntA1szs-sMbRV9SV-27" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-54" style="edgeStyle=entityRelationEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0;entryDx=0;entryDy=0;fontSize=8;fontColor=#FF0080;shape=link;strokeColor=#82b366;fillColor=#d5e8d4;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-25" target="E0nTntA1szs-sMbRV9SV-51" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-25" value="NacosServiceRegistry<br><font style="font-size: 8px" color="#007fff">实现了ServiceRegistry接口</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="470" y="300" width="106" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-35" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-27" target="E0nTntA1szs-sMbRV9SV-34" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-27" value="NacosAutoServiceRegistration<br><font color="#007fff"><font style="font-size: 8px">包含前面两个Bean的引用(依赖注入)</font><br><span style="font-size: 8px">继承AbstractAutoServiceRegistration</span><br><span style="font-size: 8px">又间接实现了ApplicationListener,监听WebServerInitializedEvent事件</span></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="447.75" y="360" width="150.5" height="60" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-36" value="事件发布" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-29" edge="1">
<mxGeometry x="0.3688" relative="1" as="geometry">
<mxPoint x="640" y="390" as="targetPoint" />
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-29" value="publishEvent(new <b>ServletWebServerInitializedEvent</b><br>(webServer, this))<br><font color="#3399ff" style="font-size: 8px">Web服务器(比如Tomcat)启动后发布事件</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="620" y="280" width="161.75" height="60" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-32" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=8;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-31" target="E0nTntA1szs-sMbRV9SV-29" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-31" value="WebServer启动后" style="rounded=1;whiteSpace=wrap;html=1;fontSize=8;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="640.88" y="220" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-38" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-34" target="E0nTntA1szs-sMbRV9SV-37" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-34" value="onApplicationEvent(<br>WebServerInitializedEvent event)" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="680" y="370" width="145.25" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-40" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-37" target="E0nTntA1szs-sMbRV9SV-39" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-37" value="this.bind(event);" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="847" y="370" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-42" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-39" target="E0nTntA1szs-sMbRV9SV-41" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="1080" y="390" />
<mxPoint x="1080" y="440" />
<mxPoint x="460" y="440" />
<mxPoint x="460" y="480" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-39" value="this.start();" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="970" y="370" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-44" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-41" target="E0nTntA1szs-sMbRV9SV-43" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-41" value="this.context.publishEvent(new InstancePreRegisteredEvent(this, this.getRegistration()))" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="473" y="460" width="167" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-46" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-43" target="E0nTntA1szs-sMbRV9SV-45" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-52" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#FF0080;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-43" target="E0nTntA1szs-sMbRV9SV-51" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-43" value="this.register()" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="473" y="540" width="167" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-50" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-45" target="E0nTntA1szs-sMbRV9SV-49" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-45" value="&nbsp;this.context.publishEvent(new InstanceRegisteredEvent(this, this.getConfiguration()));" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="473" y="620" width="167" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-49" value="this.<b>running</b>.compareAndSet(false, true)<br><font color="#007fff">running记录Nacso客户端状态,以及防止重复启动</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="473" y="700" width="167" height="60" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-59" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#007FFF;strokeColor=#000000;entryX=0;entryY=0.5;entryDx=0;entryDy=0;curved=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-51" target="E0nTntA1szs-sMbRV9SV-61" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="880" y="560" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-51" value="this.<b>serviceRegistry</b><br>.register(this.<b>getRegistration</b>());<br><font color="#007fff">进入到NacosServiceRegistry类执行register()方法</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="680" y="535" width="160" height="50" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-64" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=9;fontColor=#007FFF;strokeColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-60" target="E0nTntA1szs-sMbRV9SV-62" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-60" value="Instance instance = this.getNacosInstanceFromRegistration(<br style="font-size: 9px">registration)<br><font color="#3399ff">实例化Instance,并初始化IP、Port、权重、集群名、元数据 等信息</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="865" y="610" width="170" height="50" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-63" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=9;fontColor=#007FFF;strokeColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-61" target="E0nTntA1szs-sMbRV9SV-60" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-61" value="String serviceId = registration.getServiceId();<br><font color="#007fff" style="font-size: 9px"><font style="font-size: 9px">即“spring.application.name”的值</font><br><font style="font-size: 9px">具体看NacosDiscoveryProperties.class</font><br></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="870" y="533.75" width="160" height="52.5" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-69" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-62" target="E0nTntA1szs-sMbRV9SV-68" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-62" value="this.namingService<br>.registerInstance(serviceId, instance);" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="870" y="690" width="160" height="50" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-65" value="NacosDiscoveryProperties解析自<br>”spring.cloud.nacos.discovery“" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=9;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1030" y="545" width="150" height="30" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-66" value="NacosServiceRegistry.class" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=9;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="695" y="515" width="130" height="20" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-67" value="AbstractAutoServiceRegistration.class" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="677.63" y="350" width="150" height="20" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-75" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#3399FF;strokeColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-68" target="E0nTntA1szs-sMbRV9SV-73" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-68" value="this.registerInstance(serviceName, "DEFAULT_GROUP", instance);" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#fff2cc;strokeColor=#d6b656;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1070" y="690" width="160" height="50" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-70" value="NacosNamingService.class" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=8;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1095" y="670" width="110" height="20" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-77" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-73" target="E0nTntA1szs-sMbRV9SV-76" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-79" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-73" target="E0nTntA1szs-sMbRV9SV-78" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-73" value="beatReactor.addBeatInfo(<br>groupedServiceName, beatInfo);<br><font color="#3399ff">提交定时任务每隔5s发送一次心跳</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#fff2cc;strokeColor=#d6b656;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="750" y="780" width="170" height="50" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-81" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-76" target="E0nTntA1szs-sMbRV9SV-80" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-76" value="serverProxy.registerService(<br>groupedServiceName, groupName, instance);<br><font color="#3399ff">服务注册请求</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#fff2cc;strokeColor=#d6b656;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="730" y="860" width="210" height="50" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-82" value="HTTP请求(心跳)" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.038;entryY=0.545;entryDx=0;entryDy=0;entryPerimeter=0;fontSize=8;fontColor=#007FFF;strokeColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-78" target="E0nTntA1szs-sMbRV9SV-6" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-78" value="serverProxy.sendBeat(beatInfo, BeatReactor.this.lightBeatEnabled)<br><font color="#007fff">serverProxy是Http客户端<br>PUT&nbsp;</font><span style="color: rgb(0 , 127 , 255)">/nacos/v1/ns/instance</span><font color="#007fff">/instance/beat<br></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="980" y="780" width="200" height="50" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-83" value="HTTP请求<br>(服务注册)" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontSize=8;fontColor=#007FFF;strokeColor=#000000;entryX=0.005;entryY=0.62;entryDx=0;entryDy=0;entryPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-80" target="E0nTntA1szs-sMbRV9SV-6" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="1300" y="886" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-80" value="this.reqAPI(UtilAndComs.NACOS_URL_INSTANCE, params, (String)"POST");<br><font color="#007fff">POST /nacos/v1/ns/instance</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="980" y="860" width="240" height="50" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-87" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-84" target="E0nTntA1szs-sMbRV9SV-86" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-84" value="NacosDiscoveryProperties<br><font color="#3399ff">即前面用到的配置属性</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="443" y="940" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-89" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#3399FF;strokeColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-86" target="E0nTntA1szs-sMbRV9SV-88" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-86" value="NacosDiscoveryClient<br><font color="#3399ff">依赖注入NacosDiscoveryProperties,继承DiscoveryClient,通过HTTP请求查看服务列表和实例列表<br></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="445" y="1000" width="157" height="60" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-88" value="NacosWatch<br><font style="font-size: 9px" color="#3399ff">这个应该是监控,需要开启spring.cloud.nacos.discovery.watch.enabled</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="435" y="1080" width="177" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-93" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;strokeColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-90" target="E0nTntA1szs-sMbRV9SV-92" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-90" value="@RibbonClients(defaultConfiguration = <b>NacosRibbonClientConfiguration</b>.class)" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="429.5" y="1160" width="187" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-95" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;strokeColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="E0nTntA1szs-sMbRV9SV-92" target="E0nTntA1szs-sMbRV9SV-94" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-92" value="NacosServerList" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="660" y="1160" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-94" value="NacosServerIntrospector" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="660" y="1220" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-96" value="spring-cloud-alibaba-nacos-discovery-2.1.0.RELEASE.jar" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=12;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="160" y="170" width="320" height="20" as="geometry" />
</mxCell>
<mxCell id="E0nTntA1szs-sMbRV9SV-97" value="nacos-1.4.1" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=12;fontColor=#3399FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1380" y="160" width="80" height="20" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-3" value="<b>POST</b>" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-0" target="vd_qBJxyYYtXZSKp8f6n-2" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="1590" y="260" />
<mxPoint x="1590" y="260" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-242" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontSize=8;fontColor=#000000;strokeColor=#000000;elbow=vertical;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontStyle=1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-0" target="cKh2JxnRFl6GvmQpNupA-243" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="1580" y="150" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-245" value="<b>DELETE</b>" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=8;fontColor=#000000;" parent="cKh2JxnRFl6GvmQpNupA-242" vertex="1" connectable="0">
<mxGeometry x="0.3397" y="-1" relative="1" as="geometry">
<mxPoint y="1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-0" value="/nacos/v1/ns<br>/instance" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#d5e8d4;strokeColor=#82b366;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1478" y="240" width="82" height="40" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-12" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-2" target="vd_qBJxyYYtXZSKp8f6n-10" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-2" value="register(HttpServletRequest request)<br><font color="#007fff" style="font-size: 10px">解析请求参数获取命名空间ID、服务名、服务实例</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1618" y="235" width="140" height="50" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-9" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-4" target="vd_qBJxyYYtXZSKp8f6n-8" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="1978" y="345" />
<mxPoint x="1978" y="260" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-4" value="serviceManager.<b>registerInstance</b>(<br>namespaceId, serviceName, instance)<br><font color="#007fff">注册服务实例</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1798" y="320" width="162" height="50" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-6" value="Instance 数据结构" style="swimlane;fontSize=10;fontColor=#007FFF;startSize=20;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-1798" y="240.5" width="360" height="260" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-7" value="<div><font color="#000000">lastBeat = 1654644820891 </font>//收到的最后一次新跳时间</div><div><font color="#000000">mockValid = false</font></div><div><font color="#000000">marked = false</font></div><div><font color="#000000">tenant = null</font></div><div><font color="#000000">app = "DEFAULT"</font></div><div><font color="#000000">instanceId = "192.168.2.169#9002#nj#DEFAULT_GROUP@@stock-service"</font></div><div><font color="#000000">ip = "192.168.2.169"</font></div><div><font color="#000000">port = 9002</font></div><div><font color="#000000">weight = 1.0</font></div><div><font color="#000000">healthy = true</font><span style="color: rgb(0 , 0 , 0) ; white-space: pre">	</span>//实例健康状态,心跳超时15s后设为false</div><div><font color="#000000">enabled = true</font></div><div><font color="#000000">ephemeral = true</font></div><div><font color="#000000">clusterName = "nj"</font></div><div><font color="#000000">serviceName = "DEFAULT_GROUP@@stock-service"</font></div><div><font color="#000000">metadata = {LinkedHashMap@12246}&nbsp; size = 2</font></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=10;fontColor=#007FFF;align=left;" parent="vd_qBJxyYYtXZSKp8f6n-6" vertex="1">
<mxGeometry y="20" width="360" height="240" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-16" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-8" target="vd_qBJxyYYtXZSKp8f6n-15" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-20" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-8" target="vd_qBJxyYYtXZSKp8f6n-19" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-8" value="createEmptyService(namespaceId, serviceName, instance.isEphemeral())<br><font color="#3399ff" style="font-size: 8px">服务不存在就创建空Service并存入注册表<br>启动心跳检查计划任务<br>注册服务节点变更监听</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1998" y="225.5" width="162" height="70" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-14" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=10;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-10" target="vd_qBJxyYYtXZSKp8f6n-4" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-10" value="instance = parseInstance(request)" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1800" y="240" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-18" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-15" target="vd_qBJxyYYtXZSKp8f6n-17" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-15" value="getService(namespaceId, serviceName);" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1998" y="1340" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-109" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-17" target="cKh2JxnRFl6GvmQpNupA-108" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-17" value="<font style="font-size: 10px"><font style="font-size: 10px"><b>addInstance</b>(namespaceId, serviceName, instance.isEphemeral(), instance)</font><br></font><font color="#007fff" style="font-size: 9px">前面是创建空服务,这里添加服务实例<br>通过一致性协议同步给其他节点<br></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1996" y="1420" width="162" height="80" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-22" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-19" target="vd_qBJxyYYtXZSKp8f6n-21" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-19" value="createServiceIfAbsent(namespaceId, serviceName, local, null)<font color="#007fff"><br><font style="font-size: 8px">从ServiceManager的serviceMap获取命名空间为namespaceId、服务名为serviceName的服务,没有就创建,已经存在就略过</font></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2198" y="230.5" width="180" height="60" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-24" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-21" target="vd_qBJxyYYtXZSKp8f6n-23" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-21" target="cKh2JxnRFl6GvmQpNupA-3" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-21" value="getService(namespaceId, serviceName)" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2419" y="240.5" width="119" height="40" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-23" value="Map&lt;String, Map&lt;String, Service&gt;&gt; <b>serviceMap</b><br><font color="#007fff">注解表结构</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#d5e8d4;strokeColor=#82b366;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2578" y="240.5" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-28" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-25" target="vd_qBJxyYYtXZSKp8f6n-27" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="2568" y="381" />
<mxPoint x="2568" y="321" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="tu7KC7_A9Dg24m53ykQn-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0;entryDx=0;entryDy=0;fontColor=#007FFF;curved=1;fillColor=#d5e8d4;strokeColor=#82b366;dashed=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-25" target="cKh2JxnRFl6GvmQpNupA-179" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="2590" y="410" />
<mxPoint x="2590" y="1483" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-25" value="new Service()<br>putServiceAndInit(service)<br><font color="#007fff">只是建了个空Service实例,直到后面updateIPs() 才完整</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#e3c800;strokeColor=#B09500;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2400" y="360.5" width="160" height="49.5" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-30" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-27" target="vd_qBJxyYYtXZSKp8f6n-29" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-32" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-27" target="vd_qBJxyYYtXZSKp8f6n-31" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-27" value="putService(service)" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2588.5" y="300.5" width="119" height="40" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-34" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-29" target="vd_qBJxyYYtXZSKp8f6n-33" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="Sf5YBq0qI29CyhUMobhk-2" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontColor=#000000;curved=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-29" target="Sf5YBq0qI29CyhUMobhk-1" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="2648" y="430" />
<mxPoint x="2318" y="430" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-29" value="service.init()" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2588.5" y="360.5" width="119" height="40" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-31" value="serviceMap.get(service.getNamespaceId())<br>.<b>put</b>(service.getName(), service)" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#d5e8d4;strokeColor=#82b366;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2758" y="300.5" width="200" height="40" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-36" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="vd_qBJxyYYtXZSKp8f6n-33" target="vd_qBJxyYYtXZSKp8f6n-35" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-33" value="<b>HealthCheckReactor</b><br>.scheduleCheck(<b>clientBeatCheckTask</b>)<br><font color="#3399ff">使用GlobalExecutor定时执行心跳检查任务,GlobalExecutor创建了一批线程池</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2758" y="355.5" width="200" height="50" as="geometry" />
</mxCell>
<mxCell id="vd_qBJxyYYtXZSKp8f6n-35" value="GlobalExecutor.scheduleNamingHealth(task, 5000, 5000, TimeUnit.MILLISECONDS)<br><font color="#007fff">使用NAMING_HEALTH_EXECUTOR线程池执行</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2998" y="355.5" width="200" height="50" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-201" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Sf5YBq0qI29CyhUMobhk-0" target="cKh2JxnRFl6GvmQpNupA-200" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="3200" y="240" />
<mxPoint x="3200" y="120" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="Sf5YBq0qI29CyhUMobhk-0" value="<b>ClientBeatCheckTask</b>$run()<br><font style="font-size: 9px" color="#007fff">每个Service有一个心跳检查定时任务,5s一次,遍历检查此服务所有实例的心跳状态</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3028" y="220" width="140" height="60" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-11" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=9;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Sf5YBq0qI29CyhUMobhk-1" target="cKh2JxnRFl6GvmQpNupA-10" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-14" value="" style="edgeStyle=entityRelationEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#007FFF;strokeColor=none;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Sf5YBq0qI29CyhUMobhk-1" target="cKh2JxnRFl6GvmQpNupA-13" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;curved=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Sf5YBq0qI29CyhUMobhk-1" target="cKh2JxnRFl6GvmQpNupA-13" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="Sf5YBq0qI29CyhUMobhk-1" value="<div style="font-size: 9px"><b>consistencyService</b><span style="font-size: 9px"><b>.listen</b>(</span></div><div style="font-size: 9px">KeyBuilder.buildInstanceListKey(service.getNamespaceId(), service.getName(), <b>true</b>), service)</div>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2198" y="460" width="240" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-0" value="ServiceManager.class" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1813" y="300" width="130" height="20" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-1" value="ServiceManager @Component" style="swimlane;fontSize=10;fontColor=#007FFF;startSize=20;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-1362" y="240.5" width="440" height="320" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-2" value="<div><div>// Service容器:<span>Map(namespace, Map(group::serviceName, Service))</span></div><div><font color="#000000">private final Map&lt;String, Map&lt;String, <b>Service</b>&gt;&gt; <b>serviceMap</b> = new ConcurrentHashMap&lt;&gt;();</font></div><div><font color="#000000">private final LinkedBlockingDeque&lt;ServiceKey&gt; <b>toBeUpdatedServicesQueue</b> = new LinkedBlockingDeque&lt;&gt;(1024 * 1024);</font></div><div><font color="#000000">private final Synchronizer synchronizer = new ServiceStatusSynchronizer();</font></div><div><font color="#000000">private final Lock lock = new ReentrantLock();</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">@Resource(name = "consistencyDelegate")</font></div><div><font color="#000000">private ConsistencyService <b>consistencyService</b>;</font></div><div><font color="#000000">private final SwitchDomain <b>switchDomain</b>;</font></div><div><font color="#000000">private final DistroMapper <b>distroMapper</b>;</font></div><div><font color="#000000">private final ServerMemberManager <b>memberManager</b>;</font></div><div><font color="#000000">private final PushService <b>pushService</b>;</font></div><div><font color="#000000">private final RaftPeerSet <b>raftPeerSet</b>;</font></div><div><font color="#000000">private int maxFinalizeCount = 3;</font></div><div><font color="#000000">private final Object putServiceLock = new Object();</font></div><div><font color="#000000">@Value("${nacos.naming.empty-service.auto-clean:false}")</font></div><div><font color="#000000">private boolean emptyServiceAutoClean;</font></div><div><font color="#000000">@Value("${nacos.naming.empty-service.clean.initial-delay-ms:60000}")</font></div><div><font color="#000000">private int cleanEmptyServiceDelay;</font></div><div><font color="#000000">@Value("${nacos.naming.empty-service.clean.period-time-ms:20000}")</font></div><div><font color="#000000">private int cleanEmptyServicePeriod;</font></div></div><div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=10;fontColor=#007FFF;align=left;" parent="cKh2JxnRFl6GvmQpNupA-1" vertex="1">
<mxGeometry y="20" width="440" height="300" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-5" value="Y" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontColor=#007FFF;fontSize=8;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-3" target="vd_qBJxyYYtXZSKp8f6n-25" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-6" value="N" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=10;fontColor=#007FFF;curved=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-3" target="vd_qBJxyYYtXZSKp8f6n-19" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-3" value="service == null" style="rhombus;whiteSpace=wrap;html=1;fontColor=#007FFF;rounded=1;arcSize=9;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2428.5" y="298" width="100" height="45" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-7" value="Service 数据结构" style="swimlane;fontSize=10;fontColor=#007FFF;startSize=20;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-882" y="240.5" width="400" height="230" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-8" value="<div><font color="#000000">private ClientBeatCheckTask <b>clientBeatCheckTask</b> = new ClientBeatCheckTask(this);</font></div><div><font color="#000000">private int finalizeCount = 0;</font></div><div><font color="#000000">private String token;</font></div><div><font color="#000000">private List&lt;String&gt; owners = new ArrayList&lt;&gt;();</font></div><div><font color="#000000">private Boolean resetWeight = false;</font></div><div><font color="#000000">private Boolean enabled = true;</font></div><div><font color="#000000">private Selector <b>selector</b> = new NoneSelector();</font></div><div><font color="#000000">private String namespaceId;</font></div><div><font color="#000000">private long ipDeleteTimeout = 30 * 1000;</font></div><div><font color="#000000">private volatile long lastModifiedMillis = 0L;</font></div><div><font color="#000000">private volatile String checksum;</font></div><div><font color="#000000">private long pushCacheMillis = 0L;</font></div><div><span style="color: rgb(0 , 0 , 0)">private Map&lt;String, </span><b style="color: rgb(0 , 0 , 0)">Cluster</b><span style="color: rgb(0 , 0 , 0)">&gt; </span><b style="color: rgb(0 , 0 , 0)">clusterMap</b><span style="color: rgb(0 , 0 , 0)"> = new HashMap&lt;&gt;();</span><br></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=10;fontColor=#007FFF;align=left;" parent="cKh2JxnRFl6GvmQpNupA-7" vertex="1">
<mxGeometry y="20" width="400" height="210" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-16" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontSize=10;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-10" target="cKh2JxnRFl6GvmQpNupA-13" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-10" value="<div style="font-size: 9px"><b>consistencyService</b><span style="font-size: 9px"><b>.listen</b>(</span></div><div style="font-size: 9px">KeyBuilder.buildInstanceListKey(service.getNamespaceId(), service.getName(), <b>false</b>), service)</div>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2198" y="540" width="240" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-19" value="<pre style="background-color: rgb(43 , 43 , 43)"><font face="jetbrains mono, monospace"><span style="font-size: 8.4pt"><br></span></font></pre>" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-21" target="cKh2JxnRFl6GvmQpNupA-18" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="2768" y="530" as="sourcePoint" />
<mxPoint x="2919" y="520" as="targetPoint" />
<Array as="points">
<mxPoint x="2798" y="520" />
<mxPoint x="2798" y="580" />
<mxPoint x="2978" y="580" />
<mxPoint x="2978" y="460" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-20" value="com.alibaba.nacos.naming.iplist.ephemeral." style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=9;fontColor=#3333FF;" parent="cKh2JxnRFl6GvmQpNupA-19" vertex="1" connectable="0">
<mxGeometry x="0.113" y="2" relative="1" as="geometry">
<mxPoint x="-54" y="-3" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-22" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3333FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-13" target="cKh2JxnRFl6GvmQpNupA-21" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-13" value="<div><b>DelegateConsistencyServiceImpl</b>$<br>listen(String key, RecordListener listener)<br></div>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2478" y="500" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-35" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3333FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-18" target="cKh2JxnRFl6GvmQpNupA-34" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-18" value="<div><b>EphemeralConsistencyService</b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2998" y="440" width="200" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-23" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontSize=10;fontColor=#3333FF;strokeColor=#000000;elbow=vertical;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-21" target="cKh2JxnRFl6GvmQpNupA-24" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="2978" y="520" as="targetPoint" />
<Array as="points">
<mxPoint x="2798" y="520" />
<mxPoint x="2798" y="480" />
<mxPoint x="2968" y="480" />
<mxPoint x="2968" y="540" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-25" value="<span style="color: rgba(0 , 0 , 0 , 0) ; font-family: monospace ; font-size: 0px ; background-color: rgb(248 , 249 , 250)">%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22%26lt%3Bdiv%26gt%3B%26lt%3Bb%26gt%3BDelegateConsistencyServiceImpl%26lt%3B%2Fb%26gt%3B%24%26lt%3Bbr%26gt%3Blisten(String%20key%2C%20RecordListener%20listener)%26lt%3Bbr%26gt%3B%26lt%3B%2Fdiv%26gt%3B%22%20style%3D%22rounded%3D1%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3BfontSize%3D9%3Balign%3Dcenter%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%222870%22%20y%3D%22450%22%20width%3D%22180%22%20height%3D%2240%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3</span>" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=10;fontColor=#3333FF;" parent="cKh2JxnRFl6GvmQpNupA-23" vertex="1" connectable="0">
<mxGeometry x="0.1972" y="-3" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-26" value="com.alibaba.nacos.naming.domains.meta." style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=9;fontColor=#3333FF;" parent="cKh2JxnRFl6GvmQpNupA-23" vertex="1" connectable="0">
<mxGeometry x="0.1483" y="-2" relative="1" as="geometry">
<mxPoint x="-24" y="-2" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-27" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3333FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-21" target="cKh2JxnRFl6GvmQpNupA-18" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="2788" y="520" />
<mxPoint x="2788" y="460" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-28" value="com.alibaba.nacos.naming.domains.meta." style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=9;fontColor=#3333FF;" parent="cKh2JxnRFl6GvmQpNupA-27" vertex="1" connectable="0">
<mxGeometry x="0.0794" y="-2" relative="1" as="geometry">
<mxPoint x="18" y="-2" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-29" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3333FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-21" target="cKh2JxnRFl6GvmQpNupA-24" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="2778" y="520" />
<mxPoint x="2778" y="600" />
<mxPoint x="2978" y="600" />
<mxPoint x="2978" y="540" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-30" value="else" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=9;fontColor=#3333FF;" parent="cKh2JxnRFl6GvmQpNupA-29" vertex="1" connectable="0">
<mxGeometry x="0.1016" y="-4" relative="1" as="geometry">
<mxPoint x="-9" y="-4" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-21" value="key" style="rhombus;whiteSpace=wrap;html=1;fontSize=9;rounded=1;arcSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2678" y="500" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-97" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=6;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-24" target="cKh2JxnRFl6GvmQpNupA-96" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-24" value="<div><b>PersistentConsistencyServiceDelegateImpl</b><br></div>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2998" y="520" width="200" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-33" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=9;fontColor=#3333FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-31" target="vd_qBJxyYYtXZSKp8f6n-0" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="tu7KC7_A9Dg24m53ykQn-113" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-31" target="tu7KC7_A9Dg24m53ykQn-110" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="tu7KC7_A9Dg24m53ykQn-121" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-31" target="tu7KC7_A9Dg24m53ykQn-120" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-31" value="<b>naming<br>模块<br></b>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1380" y="240.5" width="60" height="39.5" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-40" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3333FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-34" target="cKh2JxnRFl6GvmQpNupA-39" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-34" value="<div><b>ephemeralConsistencyService.listen(key, listener)<br></b>实现类:<b>DistroConsistencyServiceImpl</b></div>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3240" y="440" width="200" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-39" value="<div><span style="font-weight: normal">listeners.get(key).add(listener);</span><br></div>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fontStyle=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3480" y="440" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-41" value="观察者模式,注册事件监听器,<br>Service本身是个事件监听器,<br>监听一致性协议事件" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=9;fontColor=#3333FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3260" y="405" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-51" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;dashed=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-42" target="cKh2JxnRFl6GvmQpNupA-50" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="2438" y="840" as="sourcePoint" />
<mxPoint x="2479" y="840" as="targetPoint" />
<Array as="points">
<mxPoint x="2470" y="640" />
<mxPoint x="2470" y="640" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-42" value="<b>DistroConsistencyServiceImpl</b>$<br><font color="#007fff">临时节点一致性实现 @Service Bean<br>看有onXxx方法,估计本身也监听事件,所以这个类估计就是个事件中转<br></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#f8cecc;strokeColor=#b85450;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2258" y="620" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-43" value="一致性协议事件中转分发" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=9;fontColor=#3333FF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2293" y="600" width="110" height="20" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-46" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-44" target="cKh2JxnRFl6GvmQpNupA-45" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-48" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-44" target="cKh2JxnRFl6GvmQpNupA-47" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-44" value="<div><b>Service 事件处理<br></b></div><b>实现RecordListener</b>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#e3c800;strokeColor=#B09500;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2258" y="1030" width="122" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-174" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=7;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-45" target="cKh2JxnRFl6GvmQpNupA-173" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-45" value="<b>onChange(String key, </b><br><b>T value)</b><br><font color="#007fff">实例添加、修改</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#d5e8d4;strokeColor=#82b366;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2420" y="1000" width="122" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-47" value="<b>onDelete(String key)</b><br><font color="#007fff">实例删除</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#d5e8d4;strokeColor=#82b366;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2420" y="1060" width="122" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-49" value="服务变更同步事件处理" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=9;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2264" y="1005" width="110" height="20" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-53" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-50" target="cKh2JxnRFl6GvmQpNupA-52" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="2600" y="840" as="sourcePoint" />
<mxPoint x="2660" y="840" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-54" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;entryX=0;entryY=0.5;entryDx=0;entryDy=0;dashed=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-50" target="cKh2JxnRFl6GvmQpNupA-55" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="2640" y="900" as="targetPoint" />
<mxPoint x="2600" y="840" as="sourcePoint" />
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-60" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;dashed=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-50" target="cKh2JxnRFl6GvmQpNupA-56" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="2600" y="840" as="sourcePoint" />
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-50" value="@PostConstruct <b>init()</b><br><font color="#007fff">Distro一致性服务初始化</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2479" y="620" width="121" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-52" value="向DISTRO_NOTIFY_EXECUTOR线程池提交了Notifier任务" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2660" y="620" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-62" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-55" target="cKh2JxnRFl6GvmQpNupA-61" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="2840" y="840" />
<mxPoint x="2840" y="765" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-55" value="<b>Notifier</b>$run()<br>监听<br><font color="#007fff">异步处理</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2660" y="820" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-171" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-56" target="cKh2JxnRFl6GvmQpNupA-170" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-56" value="<b>Notifier</b>$addTask(String datumKey, DataOperation action)<br><font color="#3399ff">发布事件者必调用这个添加数据同步任务</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#fff2cc;strokeColor=#d6b656;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2660" y="695" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-64" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-61" target="cKh2JxnRFl6GvmQpNupA-63" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-61" value="<span style="font-weight: normal">for(;;) start</span>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fontStyle=1" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2878" y="760" width="142" height="10" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-66" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-63" target="cKh2JxnRFl6GvmQpNupA-65" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-63" value="Pair&lt;String, DataOperation&gt; pair = tasks.take()<br><font color="#007fff">阻塞等待获取任务</font>" style="whiteSpace=wrap;html=1;fontSize=9;rounded=1;fontStyle=0;fillColor=#fff2cc;strokeColor=#d6b656;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2878" y="790" width="142" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-68" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=9;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-65" target="cKh2JxnRFl6GvmQpNupA-67" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-75" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-65" target="cKh2JxnRFl6GvmQpNupA-74" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="3050" y="870" />
<mxPoint x="3050" y="780" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-65" value="handle(pair)<br><font color="#007fff">任务处理</font>" style="whiteSpace=wrap;html=1;fontSize=9;rounded=1;fontStyle=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2878" y="850" width="142" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-71" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=9;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-67" target="cKh2JxnRFl6GvmQpNupA-55" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-67" value="<span style="font-weight: normal">for(;;) end</span>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fontStyle=1" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2878" y="920" width="142" height="10" as="geometry" />
</mxCell>
<mxCell id="CK4975RrXwExiHhc40Je-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;curved=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-72" target="CK4975RrXwExiHhc40Je-1" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-72" value="DistroConsistencyServiceImpl 数据结构" style="swimlane;fontSize=10;fontColor=#007FFF;startSize=20;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-1362" y="600.5" width="360" height="280" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-73" value="<div><font color="#000000">private final DistroMapper distroMapper;</font></div>//封装了Map&lt;String, Datum&gt;, Datum是包含key,value(Record作为上边界类型)的结构,Instance就实现了Record接口,可以理解为就是key-&gt;Instance的Map<div><font color="#000000">private final DataStore <b>dataStore</b>;</font></div><div><font color="#000000">private final Serializer serializer;</font></div><div><font color="#000000">private final SwitchDomain switchDomain;</font></div><div><font color="#000000">private final GlobalConfig globalConfig;</font></div><div>//</div><div><font color="#000000">private final DistroProtocol <b>distroProtocol</b>;</font><br>//执行一致性任务事件分发的异步任务</div><div><font color="#000000">private volatile <b>Notifier</b> <b>notifier</b> = new Notifier();</font></div><div>//即服务名-&gt;服务实例的列表(都是临时服务类型)</div><div><font color="#000000">private Map&lt;String, ConcurrentLinkedQueue&lt;RecordListener&gt;&gt; listeners = new ConcurrentHashMap&lt;&gt;();</font></div><div><font color="#000000">private Map&lt;String, String&gt; syncChecksumTasks = new ConcurrentHashMap&lt;&gt;(16);</font><br><br><b>Notifier 数据结构</b><br><div><font color="#000000">private ConcurrentHashMap&lt;String, String&gt; <b>services</b> = new ConcurrentHashMap&lt;&gt;(10 * 1024);</font></div><div><font color="#000000">private BlockingQueue&lt;Pair&lt;String, DataOperation&gt;&gt; <b>tasks</b> = new ArrayBlockingQueue&lt;&gt;(1024 * 1024);</font></div></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=10;fontColor=#007FFF;align=left;" parent="cKh2JxnRFl6GvmQpNupA-72" vertex="1">
<mxGeometry y="20" width="360" height="260" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-90" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=6;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-74" target="cKh2JxnRFl6GvmQpNupA-76" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-74" value="services.remove(datumKey)" style="whiteSpace=wrap;html=1;fontSize=9;rounded=1;fontStyle=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3080" y="760" width="142" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-79" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-76" target="cKh2JxnRFl6GvmQpNupA-78" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-76" value="for (RecordListener listener : listeners.get(datumKey))" style="whiteSpace=wrap;html=1;fontSize=9;rounded=1;fontStyle=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3080" y="820" width="140" height="20" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-85" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-78" target="cKh2JxnRFl6GvmQpNupA-84" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-86" value="DataOperation.CHANGE" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=6;fontColor=#007FFF;" parent="cKh2JxnRFl6GvmQpNupA-85" vertex="1" connectable="0">
<mxGeometry x="0.2599" y="-1" relative="1" as="geometry">
<mxPoint x="-19" y="-1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-88" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=6;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-78" target="cKh2JxnRFl6GvmQpNupA-87" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-89" value="DataOperation.DELETE" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=6;fontColor=#007FFF;" parent="cKh2JxnRFl6GvmQpNupA-88" vertex="1" connectable="0">
<mxGeometry x="0.385" relative="1" as="geometry">
<mxPoint x="-2" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-78" value="action" style="rhombus;whiteSpace=wrap;html=1;fontSize=9;rounded=1;fontStyle=0;arcSize=5;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3110" y="860" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-94" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontSize=6;fontColor=#007FFF;strokeColor=#007FFF;elbow=vertical;dashed=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-84" target="cKh2JxnRFl6GvmQpNupA-45" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="3460" y="880" />
<mxPoint x="3460" y="910" />
<mxPoint x="2481" y="910" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-84" value="listener.onChange(datumKey, <b>dataStore</b>.get(datumKey).value)" style="whiteSpace=wrap;html=1;fontSize=9;rounded=1;fontStyle=0;arcSize=5;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3300" y="860" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-87" value="listener.onDelete(datumKey)" style="whiteSpace=wrap;html=1;fontSize=9;rounded=1;fontStyle=0;arcSize=5;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3300" y="920" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-92" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=6;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-91" target="cKh2JxnRFl6GvmQpNupA-65" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-91" value="for end" style="whiteSpace=wrap;html=1;fontSize=9;rounded=1;fontStyle=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3080" y="960" width="140" height="20" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-99" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=6;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-96" target="cKh2JxnRFl6GvmQpNupA-98" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-102" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=6;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-96" target="cKh2JxnRFl6GvmQpNupA-101" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-96" value="<b>oldPersistentConsistencyService.listen(key, listener)<br></b>实现类:<b>RaftConsistencyServiceImpl</b>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3240" y="520" width="200" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-104" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=6;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-98" target="cKh2JxnRFl6GvmQpNupA-103" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-98" value="<b>newPersistentConsistencyService.listen(key, listener)<br></b>实现类:<b>StandalonePersistentServiceProcessor</b>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3240" y="580" width="200" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-101" value="<span style="font-weight: normal">raftCore.listen(key, listener)</span>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fontStyle=1" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3480" y="520" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-103" value="<div><span style="font-weight: normal">notifier.registerListener(key, listener);</span></div><div><span style="font-weight: normal">if (startNotify) {</span></div><div><span style="font-weight: normal">&nbsp; &nbsp; &nbsp; &nbsp;notifierDatumIfAbsent(key, listener);</span></div><div><span style="font-weight: normal">&nbsp;}</span></div>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=left;fontStyle=1" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3480" y="575" width="180" height="50" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-105" value="<b>RaftConsistencyServiceImpl</b>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#f8cecc;strokeColor=#b85450;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2258" y="1140" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-106" value="<b>StandalonePersistentServiceProcessor</b>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#f8cecc;strokeColor=#b85450;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2258" y="1200" width="180" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-107" value="前面为该服务分别创建了临时和持久化key,对应的最后将该服务实例往这三个一致性服务都给注册了;<br><span style="color: rgb(255 , 0 , 128)">默认就是临时节点为何</span><font color="#ff0080">要注册到三个一致性服务???只用DistroConsistencyServiceImpl不就行了?<br>为了兼容么?<br></font>" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3700" y="440" width="280" height="90" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-111" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-108" target="cKh2JxnRFl6GvmQpNupA-110" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-108" value="KeyBuilder.buildInstanceListKey(...)<br><font color="#3399ff">获取Service Key, 比如:com.alibaba.nacos.naming.iplist.ephemeral.dev<br>##DEFAULT_GROUP@@stock-service</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2199" y="1400" width="222" height="60" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-113" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-110" target="cKh2JxnRFl6GvmQpNupA-112" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-110" value="Service service = getService(namespaceId, serviceName)" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2198" y="1480" width="222" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-124" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-112" target="cKh2JxnRFl6GvmQpNupA-117" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-112" value="synchronized (service)" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2197" y="1540" width="223" height="20" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-116" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-114" target="vd_qBJxyYYtXZSKp8f6n-17" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-114" value="synchronized end" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2198" y="1660" width="223" height="20" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-120" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-117" target="cKh2JxnRFl6GvmQpNupA-119" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-180" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=7;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-117" target="cKh2JxnRFl6GvmQpNupA-179" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-117" value="instanceList = addIpAddresses(service, ephemeral, ips)" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2499" y="1480" width="159" height="45" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-123" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-119" target="cKh2JxnRFl6GvmQpNupA-122" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-119" value="instances.setInstanceList(instanceList)" style="whiteSpace=wrap;html=1;fontSize=9;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2499" y="1640" width="159" height="45" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-125" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=10;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-122" target="cKh2JxnRFl6GvmQpNupA-114" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-155" value="默认" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-122" target="cKh2JxnRFl6GvmQpNupA-154" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-122" value="consistencyService.put(key, instances)" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2499" y="1800" width="161" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-132" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-129" target="cKh2JxnRFl6GvmQpNupA-131" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-136" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-129" target="cKh2JxnRFl6GvmQpNupA-135" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-129" value="<div>Datum datum = consistencyService<br><span>.get(...)<br><font color="#007fff">经过一步代理调用</font></span></div><font color="#007fff">DistroConsistencyServiceImpl$get()方法</font>" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2859" y="1400" width="200" height="50" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-134" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-131" target="cKh2JxnRFl6GvmQpNupA-133" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-131" value="<div>Datum datum = consistencyService<br><span>.get(...)<br><font color="#007fff">经过一步代理调用</font></span></div><font color="#007fff">DistroConsistencyServiceImpl$get()方法<br>刚开始注册服务时这里获取为null<br></font>" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3099" y="1395" width="200" height="60" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-133" value="dataStore.get(key)" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3339" y="1405" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-138" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-135" target="cKh2JxnRFl6GvmQpNupA-137" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-135" value="for (Instance instance : ips)&nbsp; start" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2859" y="1480" width="200" height="20" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-140" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-137" target="cKh2JxnRFl6GvmQpNupA-139" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-137" value="new Cluster(instance.getClusterName(), service)<br><font style="font-size: 9px" color="#3399ff">没有此集群信息就创建,这时内部数据还是空</font>" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2859" y="1520" width="200" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-142" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-139" target="cKh2JxnRFl6GvmQpNupA-141" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-148" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-139" target="cKh2JxnRFl6GvmQpNupA-147" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-139" value="cluster.init()<br><font color="#007fff">集群初始化: 创建健康检查异步任务</font>" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2859" y="1580" width="200" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-150" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-141" target="cKh2JxnRFl6GvmQpNupA-149" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-141" value="service.getClusterMap().put(<br>instance.getClusterName(), cluster)<br><font color="#007fff">新集群加入Service的clusterMap</font>" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2859" y="1640" width="200" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-143" value="Cluster 数据结构" style="swimlane;fontSize=10;fontColor=#007FFF;startSize=20;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-440" y="240.5" width="400" height="230" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-144" value="<div><font color="#000000">private String sitegroup = StringUtils.EMPTY;</font></div><div><font color="#000000">private int defCkport = 80;</font></div><div><font color="#000000">private int defIpPort = -1;</font></div><div><font color="#000000">//</font></div><div><font color="#000000">private HealthCheckTask <b>checkTask</b>;</font></div><div><font color="#000000">private Set&lt;<b>Instance</b>&gt; <b>persistentInstances</b> = new HashSet&lt;&gt;();</font></div><div><font color="#000000">private Set&lt;<b>Instance</b>&gt; <b>ephemeralInstances</b> = new HashSet&lt;&gt;();</font></div><div><font color="#000000">private <b>Service</b> <b>service</b>;</font></div><div><font color="#000000">private volatile boolean inited = false;</font></div><div><font color="#000000">private Map&lt;String, String&gt; <b>metadata</b> = new ConcurrentHashMap&lt;&gt;();</font></div>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=10;fontColor=#007FFF;align=left;" parent="cKh2JxnRFl6GvmQpNupA-143" vertex="1">
<mxGeometry y="20" width="400" height="210" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-145" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.75;exitDx=0;exitDy=0;fontSize=9;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-8" target="cKh2JxnRFl6GvmQpNupA-144" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="-440" y="290.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-146" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;fontSize=9;fontColor=#3399FF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-2" target="cKh2JxnRFl6GvmQpNupA-8" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-147" value="<div>checkTask = new <b>HealthCheckTask</b>(this);</div><div>HealthCheckReactor.<b>scheduleCheck</b>(checkTask);</div>" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="3099" y="1580" width="220" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-152" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-149" target="cKh2JxnRFl6GvmQpNupA-151" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-149" value="instance.setInstanceId(...)<br><font color="#007fff" style="font-size: 9px">生成instanceId:&nbsp;getIp() + "#" + getPort() + "#" + getClusterName() + "#" + getServiceName()</font>" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2859" y="1700" width="200" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-183" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;fontSize=8;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-151" target="cKh2JxnRFl6GvmQpNupA-179" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-151" value="for (Instance instance : ips)&nbsp; end" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2859" y="1760" width="200" height="20" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-157" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=9;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-154" target="cKh2JxnRFl6GvmQpNupA-156" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-160" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-154" target="cKh2JxnRFl6GvmQpNupA-159" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-154" value="DistroConsistencyServiceImpl<br><b>onPut</b>(key, value)" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2720" y="1800" width="158" height="40" as="geometry" />
</mxCell>
<mxCell id="tu7KC7_A9Dg24m53ykQn-119" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-156" target="tu7KC7_A9Dg24m53ykQn-118" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-156" value="<div style="font-size: 8px"><b>distroProtocol.sync(</b>new DistroKey(key, KeyBuilder.INSTANCE_LIST_KEY_PREFIX),&nbsp;</div><div style="font-size: 8px">DataOperation.CHANGE,</div><div style="font-size: 8px">globalConfig.getTaskDispatchPeriod() / 2)<br><font color="#3399ff"><b>Nacos节点之间进行数据同步</b></font></div>" style="whiteSpace=wrap;html=1;fontSize=8;rounded=1;fillColor=#e3c800;strokeColor=#B09500;align=left;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2707.5" y="1920" width="182.5" height="50" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-158" value="DistroConsistencyServiceImpl.class" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=8;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2728" y="1780" width="140" height="20" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-162" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-159" target="cKh2JxnRFl6GvmQpNupA-161" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-159" value="datum = new Datum&lt;&gt;()<br><b>dataStore</b>.put(key, datum)" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2940" y="1800" width="158" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-161" value="notifier.addTask(key, DataOperation.CHANGE)" style="whiteSpace=wrap;html=1;fontSize=10;rounded=1;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2940" y="1860" width="158" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-163" value="Notifier是一个异步任务,<br>当有服务实例注册或注销时将对应事件<br>分发给监听器也就是各个Serivce异步处理<br>优点:<br>服务注册是服务启动阶段执行的,<br>异步可以降低启动时间" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=8;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2473" y="805" width="160" height="70" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-165" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.25;exitDx=0;exitDy=0;fontSize=8;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;curved=1;entryX=1;entryY=0.792;entryDx=0;entryDy=0;entryPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-73" target="vd_qBJxyYYtXZSKp8f6n-7" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="-1440" y="440.5" as="targetPoint" />
<Array as="points">
<mxPoint x="-1398" y="685.5" />
<mxPoint x="-1398" y="450.5" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-172" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;dashed=1;fontSize=8;fontColor=#007FFF;strokeColor=#007FFF;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-170" target="cKh2JxnRFl6GvmQpNupA-63" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-170" value="tasks.offer(Pair.with(datumKey, action))<br><font color="#007fff" style="font-size: 7px">前面还有一步校验:如果队列该服务已经存在还未处理的事件,会直接忽略当前事件</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#fff2cc;strokeColor=#d6b656;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2878" y="690" width="142" height="50" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-176" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=7;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-173" target="cKh2JxnRFl6GvmQpNupA-175" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-178" value="for" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=7;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-173" target="cKh2JxnRFl6GvmQpNupA-177" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-173" value="<b>updateIPs</b>(value.getInstanceList(), KeyBuilder.matchEphemeralInstanceListKey(key))" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2578" y="1000" width="202" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-175" value="recalculateChecksum()" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2628" y="1060" width="102" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-192" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-177" target="cKh2JxnRFl6GvmQpNupA-191" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="tu7KC7_A9Dg24m53ykQn-17" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=10;fontColor=#007FFF;elbow=vertical;curved=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-177" target="tu7KC7_A9Dg24m53ykQn-16" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-177" value="<b>updateIps</b>(List&lt;Instance&gt; ips, boolean ephemeral)<br><font color="#3399ff"><b>CopyOnWrite方式更新集群实例信息</b></font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;fillColor=#e3c800;strokeColor=#B09500;fontColor=#000000;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2840" y="1000" width="202" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-181" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=8;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-179" target="cKh2JxnRFl6GvmQpNupA-129" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-179" value="<b>updateIPAddress</b>(<br>Collection&lt;Instance&gt; instances, boolean ephemeral)" style="whiteSpace=wrap;html=1;fontSize=8;rounded=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2696" y="1482.5" width="122" height="40" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-184" value="Service.class" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=8;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2727" y="1462.5" width="60" height="20" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-187" value="Cluster.class" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;fontColor=#007FFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2906" y="980" width="70" height="20" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-194" value="" style="edgeStyle=orthogonalEdgeStyle;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=8;fontColor=#007FFF;strokeColor=#000000;elbow=vertical;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="cKh2JxnRFl6GvmQpNupA-191" target="cKh2JxnRFl6GvmQpNupA-193" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="cKh2JxnRFl6GvmQpNupA-191" value="<b>getPushService().serviceChanged(this)</b>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;align=center;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="2851" y="1080" width="180" height="40" as="geometry" />
</mxCell>