Package

akka

dispatch

Permalink

package dispatch

Content Hierarchy
Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractBoundedNodeQueue[T] extends AnyRef

    Permalink
  2. abstract class AbstractNodeQueue[T] extends AtomicReference[Node[T]]

    Permalink
  3. class BalancingDispatcherConfigurator extends MessageDispatcherConfigurator

    Permalink

    Configurator for creating akka.dispatch.BalancingDispatcher.

    Configurator for creating akka.dispatch.BalancingDispatcher. Returns the same dispatcher instance for each invocation of the dispatcher() method.

    Annotations
    @silent()
  4. final case class BoundedControlAwareMailbox(capacity: Int, pushTimeOut: FiniteDuration) extends MailboxType with ProducesMessageQueue[dispatch.BoundedControlAwareMailbox.MessageQueue] with ProducesPushTimeoutSemanticsMailbox with Product with Serializable

    Permalink

    BoundedControlAwareMailbox is a bounded MailboxType, that maintains two queues to allow messages that extend akka.dispatch.ControlMessage to be delivered with priority.

  5. trait BoundedControlAwareMessageQueueSemantics extends BoundedMessageQueueSemantics with ControlAwareMessageQueueSemantics

    Permalink
  6. case class BoundedDequeBasedMailbox(capacity: Int, pushTimeOut: FiniteDuration) extends MailboxType with ProducesMessageQueue[dispatch.BoundedDequeBasedMailbox.MessageQueue] with ProducesPushTimeoutSemanticsMailbox with Product with Serializable

    Permalink

    BoundedDequeBasedMailbox is an bounded MailboxType, backed by a Deque.

  7. trait BoundedDequeBasedMessageQueue extends DequeBasedMessageQueue with BoundedDequeBasedMessageQueueSemantics

    Permalink

    BoundedMessageQueueSemantics adds bounded semantics to a DequeBasedMessageQueue, i.e.

    BoundedMessageQueueSemantics adds bounded semantics to a DequeBasedMessageQueue, i.e. blocking enqueue with timeout.

  8. trait BoundedDequeBasedMessageQueueSemantics extends DequeBasedMessageQueueSemantics with BoundedMessageQueueSemantics

    Permalink
  9. final case class BoundedMailbox(capacity: Int, pushTimeOut: FiniteDuration) extends MailboxType with ProducesMessageQueue[dispatch.BoundedMailbox.MessageQueue] with ProducesPushTimeoutSemanticsMailbox with Product with Serializable

    Permalink

    BoundedMailbox is the default bounded MailboxType used by Akka Actors.

  10. trait BoundedMessageQueueSemantics extends AnyRef

    Permalink

    BoundedMessageQueueSemantics adds bounded semantics to a QueueBasedMessageQueue, i.e.

    BoundedMessageQueueSemantics adds bounded semantics to a QueueBasedMessageQueue, i.e. blocking enqueue with timeout.

  11. class BoundedNodeMessageQueue extends AbstractBoundedNodeQueue[Envelope] with MessageQueue with BoundedMessageQueueSemantics with MultipleConsumerSemantics

    Permalink

    Lock-free bounded non-blocking multiple-producer single-consumer queue.

    Lock-free bounded non-blocking multiple-producer single-consumer queue. Discards overflowing messages into DeadLetters.

  12. class BoundedPriorityMailbox extends MailboxType with ProducesMessageQueue[dispatch.BoundedPriorityMailbox.MessageQueue] with ProducesPushTimeoutSemanticsMailbox

    Permalink

    BoundedPriorityMailbox is a bounded mailbox that allows for prioritization of its contents.

    BoundedPriorityMailbox is a bounded mailbox that allows for prioritization of its contents. Extend this class and provide the Comparator in the constructor.

  13. trait BoundedQueueBasedMessageQueue extends QueueBasedMessageQueue with BoundedMessageQueueSemantics

    Permalink
  14. class BoundedStablePriorityMailbox extends MailboxType with ProducesMessageQueue[dispatch.BoundedStablePriorityMailbox.MessageQueue] with ProducesPushTimeoutSemanticsMailbox

    Permalink

    BoundedStablePriorityMailbox is a bounded mailbox that allows for prioritization of its contents.

    BoundedStablePriorityMailbox is a bounded mailbox that allows for prioritization of its contents. Unlike the BoundedPriorityMailbox it preserves ordering for messages of equal priority. Extend this class and provide the Comparator in the constructor.

  15. trait ControlAwareMessageQueueSemantics extends QueueBasedMessageQueue

    Permalink

    ControlAwareMessageQueue handles messages that extend akka.dispatch.ControlMessage with priority.

  16. trait ControlMessage extends AnyRef

    Permalink

    Messages that extend this trait will be handled with priority by control aware mailboxes.

  17. class DefaultExecutorServiceConfigurator extends ExecutorServiceConfigurator

    Permalink
  18. trait DequeBasedMessageQueue extends QueueBasedMessageQueue with DequeBasedMessageQueueSemantics

    Permalink
  19. trait DequeBasedMessageQueueSemantics extends AnyRef

    Permalink

    DequeBasedMessageQueue refines QueueBasedMessageQueue to be backed by a java.util.Deque.

  20. class Dispatcher extends MessageDispatcher

    Permalink

    The event-based Dispatcher binds a set of Actors to a thread pool backed up by a BlockingQueue.

    The event-based Dispatcher binds a set of Actors to a thread pool backed up by a BlockingQueue.

    The preferred way of creating dispatchers is to define configuration of it and use the the lookup method in akka.dispatch.Dispatchers.

  21. class DispatcherConfigurator extends MessageDispatcherConfigurator

    Permalink

    Configurator for creating akka.dispatch.Dispatcher.

    Configurator for creating akka.dispatch.Dispatcher. Returns the same dispatcher instance for each invocation of the dispatcher() method.

  22. trait DispatcherPrerequisites extends AnyRef

    Permalink

    DispatcherPrerequisites represents useful contextual pieces when constructing a MessageDispatcher

  23. class Dispatchers extends AnyRef

    Permalink

    Dispatchers are to be defined in configuration to allow for tuning for different environments.

    Dispatchers are to be defined in configuration to allow for tuning for different environments. Use the lookup method to create a dispatcher as specified in configuration.

    Look in akka.actor.default-dispatcher section of the reference.conf for documentation of dispatcher options.

  24. final case class Envelope extends Product with Serializable

    Permalink
  25. abstract class ExecutorServiceConfigurator extends ExecutorServiceFactoryProvider

    Permalink

    An ExecutorServiceConfigurator is a class that given some prerequisites and a configuration can create instances of ExecutorService

  26. trait ExecutorServiceDelegate extends ExecutorService

    Permalink

    As the name says

  27. trait ExecutorServiceFactory extends AnyRef

    Permalink

    Function0 without the fun stuff (mostly for the sake of the Java API side of things)

  28. trait ExecutorServiceFactoryProvider extends AnyRef

    Permalink

    Generic way to specify an ExecutorService to a Dispatcher, create it with the given name if desired

  29. abstract class Foreach[-T] extends UnitFunctionBridge[T]

    Permalink

    Callback for the Future.foreach operation that will be invoked if the Future that this callback is registered on becomes completed with a success.

    Callback for the Future.foreach operation that will be invoked if the Future that this callback is registered on becomes completed with a success. This method is essentially the same operation as onSuccess.

    SAM (Single Abstract Method) class Java API

    Annotations
    @silent()
  30. class ForkJoinExecutorConfigurator extends ExecutorServiceConfigurator

    Permalink
  31. trait MailboxType extends AnyRef

    Permalink

    MailboxType is a factory to create MessageQueues for an optionally provided ActorContext.

    MailboxType is a factory to create MessageQueues for an optionally provided ActorContext.

    Possibly Important Notice

    When implementing a custom mailbox type, be aware that there is special semantics attached to system.actorOf() in that sending to the returned ActorRef may—for a short period of time—enqueue the messages first in a dummy queue. Top-level actors are created in two steps, and only after the guardian actor has performed that second step will all previously sent messages be transferred from the dummy queue into the real mailbox.

  32. abstract class Mapper[-T, +R] extends AbstractFunction1[T, R]

    Permalink

    Callback for the Future.map and Future.flatMap operations that will be invoked if the Future that this callback is registered on becomes completed with a success.

    Callback for the Future.map and Future.flatMap operations that will be invoked if the Future that this callback is registered on becomes completed with a success. This callback is the equivalent of an akka.japi.Function

    Override "apply" normally, or "checkedApply" if you need to throw checked exceptions.

    SAM (Single Abstract Method) class

    Java API

  33. abstract class MessageDispatcher extends AbstractMessageDispatcher with BatchingExecutor with ExecutionContextExecutor

    Permalink
  34. abstract class MessageDispatcherConfigurator extends AnyRef

    Permalink

    Base class to be used for hooking in new dispatchers into Dispatchers.

  35. trait MessageQueue extends AnyRef

    Permalink

    A MessageQueue is one of the core components in forming an Akka Mailbox.

    A MessageQueue is one of the core components in forming an Akka Mailbox. The MessageQueue is where the normal messages that are sent to Actors will be enqueued (and subsequently dequeued) It needs to at least support N producers and 1 consumer thread-safely.

  36. final case class MonitorableThreadFactory(name: String, daemonic: Boolean, contextClassLoader: Option[ClassLoader], exceptionHandler: UncaughtExceptionHandler = MonitorableThreadFactory.doNothing, counter: AtomicLong = new AtomicLong) extends ThreadFactory with ForkJoinWorkerThreadFactory with Product with Serializable

    Permalink
  37. trait MultipleConsumerSemantics extends AnyRef

    Permalink

    This is a marker trait for message queues which support multiple consumers, as is required by the BalancingDispatcher.

  38. class NodeMessageQueue extends AbstractNodeQueue[Envelope] with MessageQueue with UnboundedMessageQueueSemantics

    Permalink
  39. case class NonBlockingBoundedMailbox(capacity: Int) extends MailboxType with ProducesMessageQueue[BoundedNodeMessageQueue] with Product with Serializable

    Permalink

    NonBlockingBoundedMailbox is a high-performance, multiple-producer single-consumer, bounded MailboxType, Noteworthy is that it discards overflow as DeadLetters.

    NonBlockingBoundedMailbox is a high-performance, multiple-producer single-consumer, bounded MailboxType, Noteworthy is that it discards overflow as DeadLetters.

    It can't have multiple consumers, which rules out using it with BalancingPool (BalancingDispatcher) for instance.

    NOTE: NonBlockingBoundedMailbox does not use mailbox-push-timeout-time as it is non-blocking.

  40. abstract class OnComplete[-T] extends CallbackBridge[Try[T]]

    Permalink

    Callback for when a Future is completed with either failure or a success SAM (Single Abstract Method) class

    Callback for when a Future is completed with either failure or a success SAM (Single Abstract Method) class

    Java API

    Annotations
    @silent()
  41. abstract class OnFailure extends CallbackBridge[Throwable]

    Permalink

    Callback for when a Future is completed with a failure SAM (Single Abstract Method) class

    Callback for when a Future is completed with a failure SAM (Single Abstract Method) class

    Java API

    Annotations
    @silent()
  42. abstract class OnSuccess[-T] extends CallbackBridge[T]

    Permalink

    Callback for when a Future is completed successfully SAM (Single Abstract Method) class

    Callback for when a Future is completed successfully SAM (Single Abstract Method) class

    Java API

    Annotations
    @silent()
  43. class PinnedDispatcher extends Dispatcher

    Permalink

    Dedicates a unique thread for each actor passed in as reference.

    Dedicates a unique thread for each actor passed in as reference. Served through its messageQueue.

    The preferred way of creating dispatchers is to define configuration of it and use the the lookup method in akka.dispatch.Dispatchers.

  44. class PinnedDispatcherConfigurator extends MessageDispatcherConfigurator

    Permalink

    Configurator for creating akka.dispatch.PinnedDispatcher.

    Configurator for creating akka.dispatch.PinnedDispatcher. Returns new dispatcher instance for each invocation of the dispatcher() method.

  45. abstract class PriorityGenerator extends Comparator[Envelope]

    Permalink

    A PriorityGenerator is a convenience API to create a Comparator that orders the messages of a PriorityDispatcher

  46. trait ProducesMessageQueue[T <: MessageQueue] extends AnyRef

    Permalink
  47. trait QueueBasedMessageQueue extends MessageQueue with MultipleConsumerSemantics

    Permalink

    A QueueBasedMessageQueue is a MessageQueue backed by a java.util.Queue.

  48. abstract class Recover[+T] extends RecoverBridge[T]

    Permalink

    Callback for the Future.recover operation that conditionally turns failures into successes.

    Callback for the Future.recover operation that conditionally turns failures into successes.

    SAM (Single Abstract Method) class

    Java API

    Annotations
    @silent()
  49. trait RequiresMessageQueue[T] extends AnyRef

    Permalink

    Trait to signal that an Actor requires a certain type of message queue semantics.

    Trait to signal that an Actor requires a certain type of message queue semantics.

    The mailbox type will be looked up by mapping the type T via akka.actor.mailbox.requirements in the config, to a mailbox configuration. If no mailbox is assigned on Props or in deployment config then this one will be used.

    The queue type of the created mailbox will be checked against the type T and actor creation will fail if it doesn't fulfill the requirements.

  50. class SaneRejectedExecutionHandler extends RejectedExecutionHandler

    Permalink

    The RejectedExecutionHandler used by Akka, it improves on CallerRunsPolicy by throwing a RejectedExecutionException if the executor isShutdown.

    The RejectedExecutionHandler used by Akka, it improves on CallerRunsPolicy by throwing a RejectedExecutionException if the executor isShutdown. (CallerRunsPolicy silently discards the runnable in this case, which is arguably broken)

  51. final case class SingleConsumerOnlyUnboundedMailbox() extends MailboxType with ProducesMessageQueue[NodeMessageQueue] with Product with Serializable

    Permalink

    SingleConsumerOnlyUnboundedMailbox is a high-performance, multiple producer—single consumer, unbounded MailboxType, with the drawback that you can't have multiple consumers, which rules out using it with BalancingPool (BalancingDispatcher) for instance.

    SingleConsumerOnlyUnboundedMailbox is a high-performance, multiple producer—single consumer, unbounded MailboxType, with the drawback that you can't have multiple consumers, which rules out using it with BalancingPool (BalancingDispatcher) for instance.

    Currently this queue is slower for some benchmarks than the ConcurrentLinkedQueue from JDK 8 that is used by default, so be sure to measure the performance in your particular setting in order to determine which one to use.

  52. final case class TaskInvocation(eventStream: EventStream, runnable: Runnable, cleanup: () ⇒ Unit) extends Batchable with Product with Serializable

    Permalink
  53. final case class ThreadPoolConfig(allowCorePoolTimeout: Boolean = ..., corePoolSize: Int = ..., maxPoolSize: Int = ThreadPoolConfig.defaultMaxPoolSize, threadTimeout: Duration = ThreadPoolConfig.defaultTimeout, queueFactory: QueueFactory = ..., rejectionPolicy: RejectedExecutionHandler = ...) extends ExecutorServiceFactoryProvider with Product with Serializable

    Permalink

    A small configuration DSL to create ThreadPoolExecutors that can be provided as an ExecutorServiceFactoryProvider to Dispatcher

  54. final case class ThreadPoolConfigBuilder(config: ThreadPoolConfig) extends Product with Serializable

    Permalink

    A DSL to configure and create a MessageDispatcher with a ThreadPoolExecutor

  55. class ThreadPoolExecutorConfigurator extends ExecutorServiceConfigurator

    Permalink
  56. final case class UnboundedControlAwareMailbox() extends MailboxType with ProducesMessageQueue[dispatch.UnboundedControlAwareMailbox.MessageQueue] with Product with Serializable

    Permalink

    UnboundedControlAwareMailbox is an unbounded MailboxType, that maintains two queues to allow messages that extend akka.dispatch.ControlMessage to be delivered with priority.

  57. trait UnboundedControlAwareMessageQueueSemantics extends UnboundedMessageQueueSemantics with ControlAwareMessageQueueSemantics

    Permalink
  58. final case class UnboundedDequeBasedMailbox() extends MailboxType with ProducesMessageQueue[dispatch.UnboundedDequeBasedMailbox.MessageQueue] with Product with Serializable

    Permalink

    UnboundedDequeBasedMailbox is an unbounded MailboxType, backed by a Deque.

  59. trait UnboundedDequeBasedMessageQueue extends DequeBasedMessageQueue with UnboundedDequeBasedMessageQueueSemantics

    Permalink

    UnboundedDequeBasedMessageQueueSemantics adds unbounded semantics to a DequeBasedMessageQueue, i.e.

    UnboundedDequeBasedMessageQueueSemantics adds unbounded semantics to a DequeBasedMessageQueue, i.e. a non-blocking enqueue and dequeue.

  60. trait UnboundedDequeBasedMessageQueueSemantics extends DequeBasedMessageQueueSemantics with UnboundedMessageQueueSemantics

    Permalink
  61. final case class UnboundedMailbox() extends MailboxType with ProducesMessageQueue[dispatch.UnboundedMailbox.MessageQueue] with Product with Serializable

    Permalink

    UnboundedMailbox is the default unbounded MailboxType used by Akka Actors.

  62. trait UnboundedMessageQueueSemantics extends AnyRef

    Permalink

    UnboundedMessageQueueSemantics adds unbounded semantics to a QueueBasedMessageQueue, i.e.

    UnboundedMessageQueueSemantics adds unbounded semantics to a QueueBasedMessageQueue, i.e. a non-blocking enqueue and dequeue.

  63. class UnboundedPriorityMailbox extends MailboxType with ProducesMessageQueue[dispatch.UnboundedPriorityMailbox.MessageQueue]

    Permalink

    UnboundedPriorityMailbox is an unbounded mailbox that allows for prioritization of its contents.

    UnboundedPriorityMailbox is an unbounded mailbox that allows for prioritization of its contents. Extend this class and provide the Comparator in the constructor.

  64. trait UnboundedQueueBasedMessageQueue extends QueueBasedMessageQueue with UnboundedMessageQueueSemantics

    Permalink
  65. class UnboundedStablePriorityMailbox extends MailboxType with ProducesMessageQueue[dispatch.UnboundedStablePriorityMailbox.MessageQueue]

    Permalink

    UnboundedStablePriorityMailbox is an unbounded mailbox that allows for prioritization of its contents.

    UnboundedStablePriorityMailbox is an unbounded mailbox that allows for prioritization of its contents. Unlike the UnboundedPriorityMailbox it preserves ordering for messages of equal priority. Extend this class and provide the Comparator in the constructor.

Value Members

  1. object BoundedControlAwareMailbox extends Serializable

    Permalink
  2. object BoundedDequeBasedMailbox extends Serializable

    Permalink
  3. object BoundedMailbox extends Serializable

    Permalink
  4. object BoundedPriorityMailbox

    Permalink
  5. object BoundedStablePriorityMailbox

    Permalink
  6. object Dispatchers

    Permalink
  7. object Envelope extends Serializable

    Permalink
  8. object ExecutionContexts

    Permalink

    ExecutionContexts is the Java API for ExecutionContexts

  9. object Filter

    Permalink

    Java API (not recommended): Callback for the Future.filter operation that creates a new Future which will conditionally contain the success of another Future.

    Java API (not recommended): Callback for the Future.filter operation that creates a new Future which will conditionally contain the success of another Future.

    Unfortunately it is not possible to express the type of a Scala filter in Java: Function1[T, Boolean], where “Boolean” is the primitive type. It is possible to use Future.filter by constructing such a function indirectly:

    import static akka.dispatch.Filter.filterOf;
    Future<String> f = ...;
    f.filter(filterOf(new Function<String, Boolean>() {
      @Override
      public Boolean apply(String s) {
        ...
      }
    }));

    However, Future.filter exists mainly to support Scala’s for-comprehensions, thus Java users should prefer Future.map, translating non-matching values to failure cases.

  10. object ForkJoinExecutorConfigurator

    Permalink
  11. object Futures

    Permalink

    Futures is the Java API for Futures and Promises

  12. object Mailboxes

    Permalink
  13. object MonitorableThreadFactory extends Serializable

    Permalink
  14. object PriorityGenerator

    Permalink
  15. object ThreadPoolConfig extends Serializable

    Permalink
  16. object UnboundedControlAwareMailbox extends Serializable

    Permalink
  17. object UnboundedDequeBasedMailbox extends Serializable

    Permalink
  18. object UnboundedMailbox extends Serializable

    Permalink
  19. object UnboundedPriorityMailbox

    Permalink
  20. object UnboundedStablePriorityMailbox

    Permalink
  21. package affinity

    Permalink
  22. package forkjoin

    Permalink
  23. object japi

    Permalink

    This class contains bridge classes between Scala and Java.

    This class contains bridge classes between Scala and Java. Internal use only.

Ungrouped