pub struct ActorGroup<R, C> { /* private fields */ }Implementations§
Source§impl<R, C> ActorGroup<R, C>
impl<R, C> ActorGroup<R, C>
pub fn config<C1: Config>(self) -> ActorGroup<R, C1>
Sourcepub fn restart_policy(self, policy: RestartPolicy) -> Self
pub fn restart_policy(self, policy: RestartPolicy) -> Self
The behaviour on actor termination.
RestartPolicy::never is used by default.
Sourcepub fn termination_policy(self, policy: TerminationPolicy) -> Self
pub fn termination_policy(self, policy: TerminationPolicy) -> Self
The behaviour on the Terminate message.
TerminationPolicy::closing is used by default.
Sourcepub fn router<R1: Router<C>>(self, router: R1) -> ActorGroup<R1, C>
pub fn router<R1: Router<C>>(self, router: R1) -> ActorGroup<R1, C>
Installs a router.
Sourcepub fn stop_order(self, stop_order: i8) -> Self
Available on crate feature unstable only.
pub fn stop_order(self, stop_order: i8) -> Self
unstable only.Specifies the order of stopping among other groups.
Actors in groups with lower values are stopped first. Actors in groups with higher values start stopping when all actors in groups with lower values are stopped or timeout is reached. It also means that a lot of different values of this parameter among groups can lead to longer shutdown time of the node. In some environment (e.g. systemd) there is a hard limit on the shutdown time, thus the node can be forcibly terminated (by SIGKILL) before all actors are stopped gracefully.
0 by default.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.