Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
bf89dc5d
Commit
bf89dc5d
authored
Feb 09, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove kill_proxy_instance from documentation
parent
dc87904f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
11 deletions
+10
-11
libcaf_io/caf/io/basp/all.hpp
libcaf_io/caf/io/basp/all.hpp
+1
-1
libcaf_io/caf/io/basp/message_type.hpp
libcaf_io/caf/io/basp/message_type.hpp
+1
-2
libcaf_io/caf/io/basp_broker.hpp
libcaf_io/caf/io/basp_broker.hpp
+3
-3
libcaf_io/src/basp_broker.cpp
libcaf_io/src/basp_broker.cpp
+5
-5
No files found.
libcaf_io/caf/io/basp/all.hpp
View file @
bf89dc5d
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
/// Whenever a node learns the address of a remotely running actor, it
/// Whenever a node learns the address of a remotely running actor, it
/// creates Ma local proxy instance representing this actor and sends an
/// creates Ma local proxy instance representing this actor and sends an
/// `announce_proxy_instance` to the node hosting the actor. Whenever an actor
/// `announce_proxy_instance` to the node hosting the actor. Whenever an actor
/// terminates, the hosting node sends `
kill_proxy_instanc
e` messages to all
/// terminates, the hosting node sends `
down_messag
e` messages to all
/// nodes that have a proxy for this actor. This enables network-transparent
/// nodes that have a proxy for this actor. This enables network-transparent
/// actor monitoring. There are two possible ways addresses can be learned:
/// actor monitoring. There are two possible ways addresses can be learned:
///
///
...
...
libcaf_io/caf/io/basp/message_type.hpp
View file @
bf89dc5d
...
@@ -55,8 +55,7 @@ enum class message_type : uint8_t {
...
@@ -55,8 +55,7 @@ enum class message_type : uint8_t {
/// Informs the receiving node that the sending node has created a proxy
/// Informs the receiving node that the sending node has created a proxy
/// instance for one of its actors. Causes the receiving node to attach
/// instance for one of its actors. Causes the receiving node to attach
/// a functor to the actor that triggers a kill_proxy_instance
/// a functor to the actor that triggers a down_message on termination.
/// message on termination.
///
///
/// 
/// 
monitor_message
=
0x04
,
monitor_message
=
0x04
,
...
...
libcaf_io/caf/io/basp_broker.hpp
View file @
bf89dc5d
...
@@ -138,10 +138,10 @@ struct basp_broker_state : proxy_registry::backend, basp::instance::callee {
...
@@ -138,10 +138,10 @@ struct basp_broker_state : proxy_registry::backend, basp::instance::callee {
// keeps a list of nodes that monitor a particular local actor
// keeps a list of nodes that monitor a particular local actor
monitored_actor_map
monitored_actors
;
monitored_actor_map
monitored_actors
;
// sends a
kill_proxy
message to a remote node
// sends a
basp::down_message
message to a remote node
void
send_
kill_proxy_instanc
e
(
const
node_id
&
nid
,
actor_id
aid
,
error
err
);
void
send_
basp_down_messag
e
(
const
node_id
&
nid
,
actor_id
aid
,
error
err
);
// sends
kill_proxy_instance
message to all nodes monitoring the terminated
// sends
basp::down_
message to all nodes monitoring the terminated
// actor
// actor
void
handle_down_msg
(
down_msg
&
);
void
handle_down_msg
(
down_msg
&
);
...
...
libcaf_io/src/basp_broker.cpp
View file @
bf89dc5d
...
@@ -82,7 +82,7 @@ strong_actor_ptr basp_broker_state::make_proxy(node_id nid, actor_id aid) {
...
@@ -82,7 +82,7 @@ strong_actor_ptr basp_broker_state::make_proxy(node_id nid, actor_id aid) {
return
nullptr
;
return
nullptr
;
}
}
// create proxy and add functor that will be called if we
// create proxy and add functor that will be called if we
// receive a
kill_proxy_instance
message
// receive a
basp::down_
message
auto
mm
=
&
system
().
middleman
();
auto
mm
=
&
system
().
middleman
();
actor_config
cfg
;
actor_config
cfg
;
auto
res
=
make_actor
<
forwarding_actor_proxy
,
strong_actor_ptr
>
(
auto
res
=
make_actor
<
forwarding_actor_proxy
,
strong_actor_ptr
>
(
...
@@ -147,8 +147,8 @@ void basp_broker_state::purge_state(const node_id& nid) {
...
@@ -147,8 +147,8 @@ void basp_broker_state::purge_state(const node_id& nid) {
kvp
.
second
.
erase
(
nid
);
kvp
.
second
.
erase
(
nid
);
}
}
void
basp_broker_state
::
send_
kill_proxy_instance
(
const
node_id
&
n
id
,
void
basp_broker_state
::
send_
basp_down_message
(
const
node_id
&
nid
,
actor_id
a
id
,
actor_id
aid
,
error
rsn
)
{
error
rsn
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
nid
)
<<
CAF_ARG
(
aid
)
<<
CAF_ARG
(
rsn
));
CAF_LOG_TRACE
(
CAF_ARG
(
nid
)
<<
CAF_ARG
(
aid
)
<<
CAF_ARG
(
rsn
));
auto
path
=
instance
.
tbl
().
lookup
(
nid
);
auto
path
=
instance
.
tbl
().
lookup
(
nid
);
if
(
!
path
)
{
if
(
!
path
)
{
...
@@ -168,7 +168,7 @@ void basp_broker_state::proxy_announced(const node_id& nid, actor_id aid) {
...
@@ -168,7 +168,7 @@ void basp_broker_state::proxy_announced(const node_id& nid, actor_id aid) {
if
(
ptr
==
nullptr
)
{
if
(
ptr
==
nullptr
)
{
CAF_LOG_DEBUG
(
"kill proxy immediately"
);
CAF_LOG_DEBUG
(
"kill proxy immediately"
);
// kill immediately if actor has already terminated
// kill immediately if actor has already terminated
send_
kill_proxy_instanc
e
(
nid
,
aid
,
exit_reason
::
unknown
);
send_
basp_down_messag
e
(
nid
,
aid
,
exit_reason
::
unknown
);
}
else
{
}
else
{
auto
entry
=
ptr
->
address
();
auto
entry
=
ptr
->
address
();
auto
i
=
monitored_actors
.
find
(
entry
);
auto
i
=
monitored_actors
.
find
(
entry
);
...
@@ -187,7 +187,7 @@ void basp_broker_state::handle_down_msg(down_msg& dm) {
...
@@ -187,7 +187,7 @@ void basp_broker_state::handle_down_msg(down_msg& dm) {
if
(
i
==
monitored_actors
.
end
())
if
(
i
==
monitored_actors
.
end
())
return
;
return
;
for
(
auto
&
nid
:
i
->
second
)
for
(
auto
&
nid
:
i
->
second
)
send_
kill_proxy_instanc
e
(
nid
,
dm
.
source
.
id
(),
dm
.
reason
);
send_
basp_down_messag
e
(
nid
,
dm
.
source
.
id
(),
dm
.
reason
);
monitored_actors
.
erase
(
i
);
monitored_actors
.
erase
(
i
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment