In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to limit relevance in EA's UML drawing. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Today's illustration starts with an example.
Suppose there is a system that, after receiving an external event notification, forwards the event to the appropriate device according to the device Id. Following the previous instructions, we can model as follows.
The system operates as follows:
EventCreater generates Event and sets DeviceId
EventCreater sends the generated Event to EventDistributor
EventDistributor retrieves the corresponding Device according to DeviceId
Send Event to Device
For each EventDistributor, there may be multiple EventCreator sending Event to it. It is also possible that multiple devices receive the Event transferred from it.
In order to improve the retrieval speed, we set the ordering of the device side associated with SendEvent to {ordered}, that is, the structure is orderly, and each Device can only appear once in this list.
We know that data structures with ordered {ordered} can be arrays or linked lists. Queries are generally linear queries. This design can achieve functions and is widely used.
How's it going? is that enough?
Many people should have thought of it, not fast enough, you can hash table, B-tree! That's it, by the way. Our topic today: limited relevance. After using a qualified association, the class diagram looks like this.
Notice the small box on the right side of EventDistributor. This kind of expression is limited relevance. The SendEvent association between EventDistributor and Device in the figure can be understood as: a unique Device can be determined through deviceId in EventDistributor.
Furthermore, with the introduction of the deviceId qualifier, apart from the fact that it was an accident to get a unique Device through deviceId, it also had another meaning: the need to make this operation more efficient is almost tantamount to requiring a more efficient data structure.
Qualifying the association is also done through the association side property setting dialog box.
There are two changes in the figure. One is that the Qualifiers project in the red box is set to deviceId, while the weight in the green box is changed from "*" to 1.
Thank you for reading! This is the end of the article on "how to limit relevance in EA UML drawing". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.