akka.pattern

Patterns

object Patterns extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Patterns
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def ask (actor: ActorRef, message: Any, timeoutMillis: Long): Future[AnyRef]

    Java API for `akka.pattern.ask`: Sends a message asynchronously and returns a Future holding the eventual reply message; this means that the target actor needs to send the result to the sender reference provided.

    Java API for `akka.pattern.ask`: Sends a message asynchronously and returns a Future holding the eventual reply message; this means that the target actor needs to send the result to the sender reference provided. The Future will be completed with an akka.actor.AskTimeoutException after the given timeout has expired; this is independent from any timeout applied while awaiting a result for this future (i.e. in Await.result(..., timeout)).

    Warning: When using future callbacks, inside actors you need to carefully avoid closing over the containing actor’s object, i.e. do not call methods or access mutable state on the enclosing actor from within the callback. This would break the actor encapsulation and may introduce synchronization bugs and race conditions because the callback will be scheduled concurrently to the enclosing actor. Unfortunately there is not yet a way to detect these illegal accesses at compile time.

    Recommended usage:

      final Future<Object> f = Patterns.ask(worker, request, timeout);
      f.onSuccess(new Procedure<Object>() {
        public void apply(Object o) {
          nextActor.tell(new EnrichedResult(request, o));
        }
      });
    
  8. def ask (actor: ActorRef, message: Any, timeout: Timeout): Future[AnyRef]

    Java API for `akka.pattern.ask`: Sends a message asynchronously and returns a Future holding the eventual reply message; this means that the target actor needs to send the result to the sender reference provided.

    Java API for `akka.pattern.ask`: Sends a message asynchronously and returns a Future holding the eventual reply message; this means that the target actor needs to send the result to the sender reference provided. The Future will be completed with an akka.actor.AskTimeoutException after the given timeout has expired; this is independent from any timeout applied while awaiting a result for this future (i.e. in Await.result(..., timeout)).

    Warning: When using future callbacks, inside actors you need to carefully avoid closing over the containing actor’s object, i.e. do not call methods or access mutable state on the enclosing actor from within the callback. This would break the actor encapsulation and may introduce synchronization bugs and race conditions because the callback will be scheduled concurrently to the enclosing actor. Unfortunately there is not yet a way to detect these illegal accesses at compile time.

    Recommended usage:

      final Future<Object> f = Patterns.ask(worker, request, timeout);
      f.onSuccess(new Procedure<Object>() {
        public void apply(Object o) {
          nextActor.tell(new EnrichedResult(request, o));
        }
      });
    
  9. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  10. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  11. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  14. def gracefulStop (target: ActorRef, timeout: Duration, system: ActorSystem): Future[Boolean]

    Returns a Future that will be completed with success (value true) when existing messages of the target actor has been processed and the actor has been terminated.

    Returns a Future that will be completed with success (value true) when existing messages of the target actor has been processed and the actor has been terminated.

    Useful when you need to wait for termination or compose ordered termination of several actors.

    If the target actor isn't terminated within the timeout the Future is completed with failure ActorTimeoutException.

  15. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  16. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  17. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  18. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  19. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  20. def pipe [T] (future: Future[T]): PipeableFuture[T]

    Register an onComplete callback on this Future to send the result to the given actor reference.

    Register an onComplete callback on this Future to send the result to the given actor reference. Returns the original Future to allow method chaining.

    Recommended usage example:

      final Future<Object> f = Patterns.ask(worker, request, timeout);
      // apply some transformation (i.e. enrich with request info)
      final Future<Object> transformed = f.map(new akka.japi.Function<Object, Object>() { ... });
      // send it on to the next stage
      Patterns.pipe(transformed).to(nextActor);
    
  21. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  22. def toString (): String

    Definition Classes
    AnyRef → Any
  23. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  24. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  25. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any