In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to understand the behavior state machine". Friends who are interested might as well take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to understand the behavior state machine.
Summary
The behavior state machine can be used to define the following scenarios
Category behavior of active classes
The owning behavior for the purpose of a behavioral class in addition to the category behavior.
There is no corresponding behavioral class, purpose-independent behavior.
Methods that correspond to behavioral characteristics (that is, operation or acceptance)
Abstract grammar
Semantic meaning
1. State machine
The behavior state machine contains one or more regions, each containing a graph (which may be hierarchical), which in turn contains a set of vertices that are connected by arc migration. When the appropriate event occurs, the state opportunity is triggered to execute. The specific execution of the state machine is represented by a set of traverses of valid paths through one or more regions, triggered by issuing an event that matches the valid trigger condition in the diagram. The principles for triggering conditional matching are described later. During such a traversal, the state machine instance may execute an implicitly complex sequence of behaviors associated with the specific elements passed in the diagram (migration effect, state entry, state exit behavior, etc.)
If the state machine has a behavior category context, then this category defines which signals and invocation events can be applied to that state machine, and which features are available to the behavior owned by the state machine. The signal trigger condition and the invocation event trigger condition of the state machine are defined respectively according to the acceptance and operation of this category. These characteristics can be used to define the message event trigger conditions of the state machine.
If the state machine does not have a behavior category context (that is, it is an independent behavior), then its trigger condition does not need to be bound to the acceptance and operation of the category. For example, such a state machine might be defined as a template that takes the trigger condition as a template parameter, so that the state machine can be used with different context categories by binding appropriate invocation and signal events to the template parameters.
If the state machine defines a method for behavioral characteristics (operation or acceptance), then the parameters of the state machine should match those of the behavioral characteristics (see section 13.2.3). This means that through parameters, the state machine executes parameters that can refer to behavioral characteristics. Otherwise, the method in which the executing state machine instance accesses the occurrence of the distributed event and its associated data is undefined (see section 13).
By definition, calls executed by the state machine result in the triggered effect (see section 13.3.3) and a pool of events associated with this execution that exists as a result. The event pool of the state machine may belong to its context category object, or when the state machine defines a method of a behavior characteristic, it belongs to an instance of a category that owns that behavior characteristic.
Because of its event-driven nature, state machine execution can be in transition or in state, alternating between the two. When an event that is distributed matches at least one trigger condition for a migration, it is in the process of migration. In a migration, it may perform several behaviors that you want to associate with the selected path.
Note: when there is an doActivity behavior associated with the active state configuration, the state machine execution can be an executing behavior even if it exists in the steady state configuration.
2. Region
A region represents a behavior fragment that can be executed concurrently with other orthogonal regions. If two or more regions are owned by the same state, or by the same state machine at the top level, they are said to be orthogonal to each other. There are two situations in which an area becomes active (that is, execution begins), one is that the state it owns is entered, and the other is that the state machine that owns it directly starts execution. Each area contains a set of vertices and migrations that determine the behavior flow in the region. It can have its own starting pseudo state, or it can have its own termination state.
The default activation of a region occurs when it is implicitly entered, that is, it is not migrated by an input that terminates at the vertex of the region element (such as a state or historical pseudo node). But it should.
1) through a (local or external) migration that terminates in the state of the containing area, or
2) if it is the top-level area, when the state machine starts to execute.
The default activation means that the migration starts from the initial pseudo state in the region, if one is defined. If there is no initial pseudo state in the region, then there is no specific action. One possible treatment is to treat patterns as morbid. It can also be considered that the region remains inactive, even if the state that contains it is active. In other words, the state of the containing area can be thought of as a simple (leaf) state.
On the contrary, explicit activation occurs when the migration of vertices contained in the region is terminated. When a region of the orthogonal state is explicitly activated, it will cause all its orthogonal regions to be activated by default. Unless those areas are also explicitly entered (multiple orthogonal regions can be explicitly activated concurrently by migrating from the same bifurcated pseudo state).
3. Vertex
Vertex is an abstract class, which extracts the characteristics of different kinds of concrete nodes (state, pseudo state or connection point reference) in the state diagram. With the exception of the following, vertices can be used as destinations and / or sources for any number of migrations. The semantics of a vertex depends on the specific type it represents. In general, pseudo-state and join point references are transitional, meaning that a mixed migration is performed simply through them, arriving as an input migration and leaving as an output migration without staying. However, the state and termination states are stable vertices, and when the state machine execution enters them, it will stay inside these states until some event that can cause the migration occurs, or the state machine execution is terminated.
At this point, I believe you have a deeper understanding of "how to understand the behavior state machine". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.