p

factor

package factor

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. class AsyncActor extends Actor

    A stateless, single use actor intended to allow asynchronous operations to be run on a given address.

    A stateless, single use actor intended to allow asynchronous operations to be run on a given address.

    For example, orchestrating a chain of calls to other actors either locally or remote.

    The actor will stop itself after receiving just one message, but any Futures/Tasks that are in flight will complete regardless.

  2. class Factor[E, S] extends Actor

    A "Factor" (functional-actor) is a potentially remote Akka actor that stores two kinds of internal data:

    A "Factor" (functional-actor) is a potentially remote Akka actor that stores two kinds of internal data:

    • It has an immutable "environment" of some type E, representing some kind of initial context or configuration specific to the actor that never changes. If not needed it can be set to Unit
    • It has a state of type S that can be modified by computations performed in the actor

    And has exactly one behavior: - When sent a Function2 instance (aka lambda, closure), it invokes passed the function passing it E and S. It requires the function to return a Product2[S, A], being the new state S and the reply A. Product2 generalizes 2-tuples and 2-field case classes in Scala. The reply is then sent as a message to the sender.

    If an exception or timeout occurs during invocation, the state is not updated, and the sender is sent a failure message.

    If it is sent any message save a Function2 a failure is sent back.

    The code f passed to a Factor should be synchronous and not include async non-blocking operations. That is, it should act locally over the S and E data only. If remote/async calls are needed, do them before or after accessing the state, from an AsyncActor.

  3. trait FactorRef[E, S] extends Serializable
  4. class FactorRefImpl[E, S] extends FactorRef[E, S]
  5. case class FactorSystem(address: SystemAddress, akkaConfigOverrides: String = "") extends Product with Serializable

    A FactorSystem can host host actors locally, or act as a client/controller to create or locate Factors on another host.

    A FactorSystem can host host actors locally, or act as a client/controller to create or locate Factors on another host.

    It wraps up the underlying Akka machinery, exposing simply an FactorRef which can be used to send computations to Factors.

  6. class FactorTimeout extends RuntimeException
  7. case class SystemAddress(name: String, hostname: String, port: Int) extends Product with Serializable
  8. class SystemTerminateActor extends Actor
  9. case class TestFactor[E, S](env: E, initState: S) extends FactorRef[E, S] with Product with Serializable

    Supports unit testing factor business logic without starting a FactorSystem

Value Members

  1. object FactorSystem extends Serializable
  2. object FactorTimeout extends Serializable
  3. object ValidRegex

Ungrouped