Class ScatterGatherFirstCompletedGroup
This class represents a Group router that sends messages to a Routee determined using scatter-gather-first-completed. This process has the router send a message to all of its routees. The first response is used and the remaining are discarded. If the none of the routees respond within a specified time limit, a timeout failure occurs.
Inherited Members
Namespace: Akka.Routing
Assembly: Akka.dll
Syntax
public sealed class ScatterGatherFirstCompletedGroup : Group, ISurrogated, IEquatable<RouterConfig>, IEquatable<Group>
Constructors
| Edit this page View SourceScatterGatherFirstCompletedGroup(Config)
Initializes a new instance of the ScatterGatherFirstCompletedGroup class.
Declaration
public ScatterGatherFirstCompletedGroup(Config config)
Parameters
| Type | Name | Description |
|---|---|---|
| Config | config | The configuration to use to lookup paths used by the group router. noteIf 'routees.path' is defined in the provided configuration then those paths will be used by the router. If 'within' is defined in the provided configuration then that will be used as the interval. |
ScatterGatherFirstCompletedGroup(IEnumerable<string>, TimeSpan)
Initializes a new instance of the ScatterGatherFirstCompletedGroup class.
Declaration
public ScatterGatherFirstCompletedGroup(IEnumerable<string> paths, TimeSpan within)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<string> | paths | An enumeration of actor paths used by the group router. |
| TimeSpan | within | The amount of time to wait for a response. |
ScatterGatherFirstCompletedGroup(IEnumerable<string>, TimeSpan, string)
Initializes a new instance of the ScatterGatherFirstCompletedGroup class.
Declaration
public ScatterGatherFirstCompletedGroup(IEnumerable<string> paths, TimeSpan within, string routerDispatcher)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<string> | paths | An enumeration of actor paths used by the group router. |
| TimeSpan | within | The amount of time to wait for a response. |
| string | routerDispatcher | The dispatcher to use when passing messages to the routees. |
ScatterGatherFirstCompletedGroup(TimeSpan, params string[])
Initializes a new instance of the ScatterGatherFirstCompletedGroup class.
Declaration
public ScatterGatherFirstCompletedGroup(TimeSpan within, params string[] paths)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | within | The amount of time to wait for a response. |
| string[] | paths | A list of actor paths used by the group router. |
Properties
| Edit this page View SourceWithin
The amount of time to wait for a response.
Declaration
public TimeSpan Within { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
Methods
| Edit this page View SourceCreateRouter(ActorSystem)
Creates a router that is responsible for routing messages to routees within the provided system.
Declaration
public override Router CreateRouter(ActorSystem system)
Parameters
| Type | Name | Description |
|---|---|---|
| ActorSystem | system | The actor system that owns this router. |
Returns
| Type | Description |
|---|---|
| Router | The newly created router tied to the given system. |
Overrides
| Edit this page View SourceGetPaths(ActorSystem)
Retrieves the actor paths used by this router during routee selection.
Declaration
public override IEnumerable<string> GetPaths(ActorSystem system)
Parameters
| Type | Name | Description |
|---|---|---|
| ActorSystem | system | The actor system that owns this router. |
Returns
| Type | Description |
|---|---|
| IEnumerable<string> | An enumeration of actor paths used during routee selection |
Overrides
| Edit this page View SourceToSurrogate(ActorSystem)
Creates a surrogate representation of the current ScatterGatherFirstCompletedGroup.
Declaration
public override ISurrogate ToSurrogate(ActorSystem system)
Parameters
| Type | Name | Description |
|---|---|---|
| ActorSystem | system | The actor system that owns this router. |
Returns
| Type | Description |
|---|---|
| ISurrogate | The surrogate representation of the current ScatterGatherFirstCompletedGroup. |
Overrides
| Edit this page View SourceWithDispatcher(string)
Creates a new ScatterGatherFirstCompletedGroup router with a given dispatcher id.
note
This method is immutable and returns a new instance of the router.
Declaration
public ScatterGatherFirstCompletedGroup WithDispatcher(string dispatcher)
Parameters
| Type | Name | Description |
|---|---|---|
| string | dispatcher | The dispatcher id used to configure the new router. |
Returns
| Type | Description |
|---|---|
| ScatterGatherFirstCompletedGroup | A new router with the provided dispatcher id. |
Edit this page