MasterCommand

com.phasmid.majabigwaduce.core.MasterCommand
sealed trait MasterCommand[K1, V1, K2, V2]

The command protocol handled by a Master actor.

A Master accepts its input in either of two shapes -- as a Map[K1,V1] or as a Seq[(K1,V1)] -- mirroring the two message shapes the original (classic-actor) Master.receive matched on. The "First" variants (Master_First / Master_First_Fold) reuse this same protocol with K1=Unit, exactly as the original MasterBaseFirst reused MasterBase[Unit,...] internally: their public factory functions unitize the incoming Seq[V1] into a Seq[(Unit,V1)] before it is sent here.

NOTE: unlike the classic actor (which replied with Status.Failure on a hard failure), a Typed reply can only ever be the declared type. So the reply type here is Try[Response[K2,V2]] rather than a bare Response[K2,V2] -- this preserves the original behavior of failing the caller's ask with the original exception, rather than letting it time out.

Type parameters

K1

key type: the message which this actor responds to is of type Map[K1,V1].

K2

key type: mapper groups things by this key and reducer processes said groups.

V1

input type: the message which this actor responds to is of type Seq[V1].

V2

output type: the message which is sent on completion to the sender is of type Response[K2,V2]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class CloseMaster[K1, V1, K2, V2]
class ComputeMap[K1, V1, K2, V2]
class ComputeSeq[K1, V1, K2, V2]
In this article