diff --git a/akka-actor/src/main/scala/akka/actor/ActorDSL.scala b/akka-actor/src/main/scala/akka/actor/ActorDSL.scala index b229795736..216ce062e9 100644 --- a/akka-actor/src/main/scala/akka/actor/ActorDSL.scala +++ b/akka-actor/src/main/scala/akka/actor/ActorDSL.scala @@ -61,7 +61,7 @@ import java.util.concurrent.TimeUnit * }}} * * Note that `actor` can be used with an implicit [[akka.actor.ActorRefFactory]] - * as shown with `"barney"` (where the [[akka.actor.ActorContext serves this + * as shown with `"barney"` (where the [[akka.actor.ActorContext]] serves this * purpose), but since nested declarations share the same * lexical context `"fred"`’s ActorContext would be ambiguous * if the [[akka.actor.ActorSystem]] were declared `implicit` (this could also diff --git a/akka-actor/src/main/scala/akka/actor/ActorPath.scala b/akka-actor/src/main/scala/akka/actor/ActorPath.scala index 4597d87f9c..4b87568cb0 100644 --- a/akka-actor/src/main/scala/akka/actor/ActorPath.scala +++ b/akka-actor/src/main/scala/akka/actor/ActorPath.scala @@ -60,7 +60,7 @@ sealed trait ActorPath extends Comparable[ActorPath] with Serializable { def /(child: String): ActorPath /** - * ''Java API'': Create a new child actor path. + * Java API: Create a new child actor path. */ def child(child: String): ActorPath = /(child) @@ -70,7 +70,7 @@ sealed trait ActorPath extends Comparable[ActorPath] with Serializable { def /(child: Iterable[String]): ActorPath = (this /: child)((path, elem) ⇒ if (elem.isEmpty) path else path / elem) /** - * ''Java API'': Recursively create a descendant’s path by appending all child names. + * Java API: Recursively create a descendant’s path by appending all child names. */ def descendant(names: java.lang.Iterable[String]): ActorPath = /(immutableSeq(names)) @@ -80,7 +80,7 @@ sealed trait ActorPath extends Comparable[ActorPath] with Serializable { def elements: immutable.Iterable[String] /** - * ''Java API'': Sequence of names for this path from root to this. Performance implication: has to allocate a list. + * Java API: Sequence of names for this path from root to this. Performance implication: has to allocate a list. */ def getElements: java.lang.Iterable[String] = scala.collection.JavaConverters.asJavaIterableConverter(elements).asJava diff --git a/akka-actor/src/main/scala/akka/actor/ActorRef.scala b/akka-actor/src/main/scala/akka/actor/ActorRef.scala index 2802d2c8ec..843b750ca3 100644 --- a/akka-actor/src/main/scala/akka/actor/ActorRef.scala +++ b/akka-actor/src/main/scala/akka/actor/ActorRef.scala @@ -88,7 +88,8 @@ abstract class ActorRef extends java.lang.Comparable[ActorRef] with Serializable final def compareTo(other: ActorRef) = this.path compareTo other.path /** - * Sends the specified message to the sender, i.e. fire-and-forget semantics.

+ * Sends the specified message to the sender, i.e. fire-and-forget semantics. + * *

    * actor.tell(message);
    * 
@@ -97,10 +98,10 @@ abstract class ActorRef extends java.lang.Comparable[ActorRef] with Serializable final def tell(msg: Any): Unit = this.!(msg)(null: ActorRef) /** - * Java API.

- * Sends the specified message to the sender, i.e. fire-and-forget + * Java API: Sends the specified message to the sender, i.e. fire-and-forget * semantics, including the sender reference if possible (pass `null` if - * there is nobody to reply to).

+ * there is nobody to reply to). + * *

    * actor.tell(message, context);
    * 
@@ -109,7 +110,7 @@ abstract class ActorRef extends java.lang.Comparable[ActorRef] with Serializable /** * Forwards the message and passes the original sender actor as the sender. - *

+ * * Works with '!' and '?'/'ask'. */ def forward(message: Any)(implicit context: ActorContext) = tell(message, context.sender) diff --git a/akka-actor/src/main/scala/akka/actor/ActorRefProvider.scala b/akka-actor/src/main/scala/akka/actor/ActorRefProvider.scala index 60e28f16dc..cb262495fe 100644 --- a/akka-actor/src/main/scala/akka/actor/ActorRefProvider.scala +++ b/akka-actor/src/main/scala/akka/actor/ActorRefProvider.scala @@ -258,7 +258,7 @@ trait ActorRefFactory { def actorFor(path: Iterable[String]): ActorRef = provider.actorFor(lookupRoot, path) /** - * ''Java API'': Look-up an actor by applying the given path elements, starting from the + * Java API: Look-up an actor by applying the given path elements, starting from the * current context, where `".."` signifies the parent of an actor. * * Example: diff --git a/akka-actor/src/main/scala/akka/actor/ActorSystem.scala b/akka-actor/src/main/scala/akka/actor/ActorSystem.scala index 0285cec26a..6a39dd513b 100644 --- a/akka-actor/src/main/scala/akka/actor/ActorSystem.scala +++ b/akka-actor/src/main/scala/akka/actor/ActorSystem.scala @@ -263,7 +263,7 @@ abstract class ActorSystem extends ActorRefFactory { def /(name: String): ActorPath /** - * ''Java API'': Create a new child actor path. + * Java API: Create a new child actor path. */ def child(child: String): ActorPath = /(child) @@ -273,7 +273,7 @@ abstract class ActorSystem extends ActorRefFactory { def /(name: Iterable[String]): ActorPath /** - * ''Java API'': Recursively create a descendant’s path by appending all child names. + * Java API: Recursively create a descendant’s path by appending all child names. */ def descendant(names: java.lang.Iterable[String]): ActorPath = /(immutableSeq(names)) @@ -338,15 +338,13 @@ abstract class ActorSystem extends ActorRefFactory { def registerOnTermination[T](code: ⇒ T): Unit /** - * Register a block of code (callback) to run after ActorSystem.shutdown has been issued and + * Java API: Register a block of code (callback) to run after ActorSystem.shutdown has been issued and * all actors in this actor system have been stopped. * Multiple code blocks may be registered by calling this method multiple times. * The callbacks will be run sequentially in reverse order of registration, i.e. * last registration is run first. * * @throws a RejectedExecutionException if the System has already shut down or if shutdown has been initiated. - * - * Java API */ def registerOnTermination(code: Runnable): Unit diff --git a/akka-actor/src/main/scala/akka/actor/Extension.scala b/akka-actor/src/main/scala/akka/actor/Extension.scala index 38b6a6d37c..855fd228cc 100644 --- a/akka-actor/src/main/scala/akka/actor/Extension.scala +++ b/akka-actor/src/main/scala/akka/actor/Extension.scala @@ -95,6 +95,7 @@ trait ExtensionIdProvider { * public MyExt(ExtendedActorSystem system) { * ... * } + * } * }}} */ abstract class ExtensionKey[T <: Extension](implicit m: ClassTag[T]) extends ExtensionId[T] with ExtensionIdProvider { diff --git a/akka-actor/src/main/scala/akka/actor/FaultHandling.scala b/akka-actor/src/main/scala/akka/actor/FaultHandling.scala index b04ee4f06e..0249f8da9d 100644 --- a/akka-actor/src/main/scala/akka/actor/FaultHandling.scala +++ b/akka-actor/src/main/scala/akka/actor/FaultHandling.scala @@ -117,26 +117,24 @@ object SupervisorStrategy extends SupervisorStrategyLowPriorityImplicits { case object Escalate extends Directive /** - * Resumes message processing for the failed Actor - * Java API + * Java API: Returning this directive resumes message processing for the failed Actor */ def resume = Resume /** - * Discards the old Actor instance and replaces it with a new, + * Java API: Returning this directive discards the old Actor instance and replaces it with a new, * then resumes message processing. - * Java API */ def restart = Restart /** - * Stops the Actor + * Java API: Returning this directive stops the Actor * Java API */ def stop = Stop /** - * Escalates the failure to the supervisor of the supervisor, + * Java API: Returning this directive escalates the failure to the supervisor of the supervisor, * by rethrowing the cause of the failure. * Java API */ diff --git a/akka-actor/src/main/scala/akka/actor/Props.scala b/akka-actor/src/main/scala/akka/actor/Props.scala index 5608e7c8aa..07181c4f99 100644 --- a/akka-actor/src/main/scala/akka/actor/Props.scala +++ b/akka-actor/src/main/scala/akka/actor/Props.scala @@ -121,14 +121,14 @@ case class Props( dispatcher = Dispatchers.DefaultDispatcherId) /** - * Java API. + * Java API: create Props from an [[UntypedActorFactory]] */ def this(factory: UntypedActorFactory) = this( creator = () ⇒ factory.create(), dispatcher = Dispatchers.DefaultDispatcherId) /** - * Java API. + * Java API: create Props from a given [[Class]] */ def this(actorClass: Class[_ <: Actor]) = this( creator = FromClassCreator(actorClass), @@ -136,27 +136,21 @@ case class Props( routerConfig = Props.defaultRoutedProps) /** - * Returns a new Props with the specified creator set. + * Scala API: Returns a new Props with the specified creator set. * * The creator must not return the same instance multiple times. - * - * Scala API. */ def withCreator(c: ⇒ Actor): Props = copy(creator = () ⇒ c) /** - * Returns a new Props with the specified creator set. + * Java API: Returns a new Props with the specified creator set. * * The creator must not return the same instance multiple times. - * - * Java API. */ def withCreator(c: Creator[Actor]): Props = copy(creator = () ⇒ c.create) /** - * Returns a new Props with the specified creator set. - * - * Java API. + * Java API: Returns a new Props with the specified creator set. */ def withCreator(c: Class[_ <: Actor]): Props = copy(creator = FromClassCreator(c)) diff --git a/akka-actor/src/main/scala/akka/actor/TypedActor.scala b/akka-actor/src/main/scala/akka/actor/TypedActor.scala index 61cc9ee0c7..083d65f907 100644 --- a/akka-actor/src/main/scala/akka/actor/TypedActor.scala +++ b/akka-actor/src/main/scala/akka/actor/TypedActor.scala @@ -532,24 +532,20 @@ case class TypedProps[T <: AnyRef] protected[TypedProps] ( creator = instantiator(implementation)) /** - * Uses the supplied Creator as the factory for the TypedActor implementation, + * Java API: Uses the supplied Creator as the factory for the TypedActor implementation, * and that has the specified interface, * or if the interface class is not an interface, all the interfaces it implements, * appended in the sequence of interfaces. - * - * Java API. */ def this(interface: Class[_ >: T], implementation: Creator[T]) = this(interfaces = TypedProps.extractInterfaces(interface), creator = implementation.create _) /** - * Uses the supplied class as the factory for the TypedActor implementation, + * Java API: Uses the supplied class as the factory for the TypedActor implementation, * and that has the specified interface, * or if the interface class is not an interface, all the interfaces it implements, * appended in the sequence of interfaces. - * - * Java API. */ def this(interface: Class[_ >: T], implementation: Class[T]) = this(interfaces = TypedProps.extractInterfaces(interface), @@ -566,15 +562,13 @@ case class TypedProps[T <: AnyRef] protected[TypedProps] ( def withDeploy(d: Deploy): TypedProps[T] = copy(deploy = d) /** - * @return a new TypedProps that will use the specified ClassLoader to create its proxy class in + * Java API: return a new TypedProps that will use the specified ClassLoader to create its proxy class in * If loader is null, it will use the bootstrap classloader. - * - * Java API */ def withLoader(loader: ClassLoader): TypedProps[T] = withLoader(Option(loader)) /** - * @return a new TypedProps that will use the specified ClassLoader to create its proxy class in + * Scala API: return a new TypedProps that will use the specified ClassLoader to create its proxy class in * If loader is null, it will use the bootstrap classloader. * * Scala API @@ -582,18 +576,16 @@ case class TypedProps[T <: AnyRef] protected[TypedProps] ( def withLoader(loader: Option[ClassLoader]): TypedProps[T] = this.copy(loader = loader) /** - * @return a new TypedProps that will use the specified Timeout for its non-void-returning methods, + * Java API: return a new TypedProps that will use the specified Timeout for its non-void-returning methods, * if null is specified, it will use the default timeout as specified in the configuration. - * - * Java API */ def withTimeout(timeout: Timeout): TypedProps[T] = this.copy(timeout = Option(timeout)) /** - * @return a new TypedProps that will use the specified Timeout for its non-void-returning methods, + * Scala API: return a new TypedProps that will use the specified Timeout for its non-void-returning methods, * if None is specified, it will use the default timeout as specified in the configuration. * - * Scala API + * */ def withTimeout(timeout: Option[Timeout]): TypedProps[T] = this.copy(timeout = timeout) diff --git a/akka-actor/src/main/scala/akka/dispatch/Future.scala b/akka-actor/src/main/scala/akka/dispatch/Future.scala index 6e6c20225c..b9ee1f3214 100644 --- a/akka-actor/src/main/scala/akka/dispatch/Future.scala +++ b/akka-actor/src/main/scala/akka/dispatch/Future.scala @@ -83,27 +83,34 @@ object ExecutionContexts { object Futures { import scala.collection.JavaConverters.iterableAsScalaIterableConverter /** - * Java API, equivalent to Future.apply + * Starts an asynchronous computation and returns a `Future` object with the result of that computation. + * + * The result becomes available once the asynchronous computation is completed. + * + * @param body the asychronous computation + * @param executor the execution context on which the future is run + * @return the `Future` holding the result of the computation */ def future[T](body: Callable[T], executor: ExecutionContext): Future[T] = Future(body.call)(executor) /** - * Java API, equivalent to Promise.apply + * Creates a promise object which can be completed with a value. + * + * @return the newly created `Promise` object */ def promise[T](): Promise[T] = Promise[T]() /** - * Java API, creates an already completed Promise with the specified exception + * creates an already completed Promise with the specified exception */ def failed[T](exception: Throwable): Future[T] = Future.failed(exception) /** - * Java API, Creates an already completed Promise with the specified result + * Creates an already completed Promise with the specified result */ def successful[T](result: T): Future[T] = Future.successful(result) /** - * Java API. * Returns a Future that will hold the optional result of the first Future with a result that matches the predicate */ def find[T <: AnyRef](futures: JIterable[Future[T]], predicate: JFunc[T, java.lang.Boolean], executor: ExecutionContext): Future[JOption[T]] = { @@ -112,14 +119,12 @@ object Futures { } /** - * Java API. * Returns a Future to the result of the first future in the list that is completed */ def firstCompletedOf[T <: AnyRef](futures: JIterable[Future[T]], executor: ExecutionContext): Future[T] = Future.firstCompletedOf(futures.asScala)(executor) /** - * Java API * A non-blocking fold over the specified futures, with the start value of the given zero. * The fold is performed on the thread where the last future is completed, * the result will be the first failure of any of the futures, or any failure in the actual fold, @@ -129,15 +134,13 @@ object Futures { Future.fold(futures.asScala)(zero)(fun.apply)(executor) /** - * Java API. * Reduces the results of the supplied futures and binary function. */ def reduce[T <: AnyRef, R >: T](futures: JIterable[Future[T]], fun: akka.japi.Function2[R, T, R], executor: ExecutionContext): Future[R] = Future.reduce[T, R](futures.asScala)(fun.apply)(executor) /** - * Java API. - * Simple version of Future.traverse. Transforms a JIterable[Future[A]] into a Future[JIterable[A]]. + * Simple version of [[#traverse]]. Transforms a JIterable[Future[A]] into a Future[JIterable[A]]. * Useful for reducing many Futures into a single Future. */ def sequence[A](in: JIterable[Future[A]], executor: ExecutionContext): Future[JIterable[A]] = { @@ -146,7 +149,6 @@ object Futures { } /** - * Java API. * Transforms a JIterable[A] into a Future[JIterable[B]] using the provided Function A ⇒ Future[B]. * This is useful for performing a parallel map. For example, to apply a function to all items of a list * in parallel. diff --git a/akka-actor/src/main/scala/akka/event/EventBus.scala b/akka-actor/src/main/scala/akka/event/EventBus.scala index 2499d0fcd9..1f6382ac8c 100644 --- a/akka-actor/src/main/scala/akka/event/EventBus.scala +++ b/akka-actor/src/main/scala/akka/event/EventBus.scala @@ -16,7 +16,7 @@ import scala.collection.immutable * Represents the base type for EventBuses * Internally has an Event type, a Classifier type and a Subscriber type * - * For the Java API, @see akka.event.japi.* + * For the Java API, see akka.event.japi.* */ trait EventBus { type Event diff --git a/akka-actor/src/main/scala/akka/io/UdpConn.scala b/akka-actor/src/main/scala/akka/io/UdpConn.scala index 6fff5a864f..ec2cee36dc 100644 --- a/akka-actor/src/main/scala/akka/io/UdpConn.scala +++ b/akka-actor/src/main/scala/akka/io/UdpConn.scala @@ -12,7 +12,9 @@ import scala.collection.immutable import java.lang.{ Iterable ⇒ JIterable } object UdpConn extends ExtensionKey[UdpConnExt] { - // Java API + /** + * Java API: retrieve the UdpConn extension for the given system. + */ override def get(system: ActorSystem): UdpConnExt = super.get(system) trait Command extends IO.HasFailureMessage { @@ -71,7 +73,7 @@ class UdpConnExt(system: ExtendedActorSystem) extends IO.Extension { } /** - * Java API + * Java API: factory methods for the message types used when communicating with the UdpConn service. */ object UdpConnMessage { import language.implicitConversions diff --git a/akka-actor/src/main/scala/akka/io/UdpFF.scala b/akka-actor/src/main/scala/akka/io/UdpFF.scala index fc9b955b74..743df53d60 100644 --- a/akka-actor/src/main/scala/akka/io/UdpFF.scala +++ b/akka-actor/src/main/scala/akka/io/UdpFF.scala @@ -12,7 +12,9 @@ import scala.collection.immutable object UdpFF extends ExtensionKey[UdpFFExt] { - // Java API + /** + * Java API: retrieve the UdpFF extension for the given system. + */ override def get(system: ActorSystem): UdpFFExt = super.get(system) trait Command extends IO.HasFailureMessage { @@ -60,6 +62,9 @@ object UdpFF extends ExtensionKey[UdpFFExt] { } +/** + * Java API: factory methods for the message types used when communicating with the UdpConn service. + */ object UdpFFMessage { import UdpFF._ import java.lang.{ Iterable ⇒ JIterable } diff --git a/akka-actor/src/main/scala/akka/japi/JavaAPI.scala b/akka-actor/src/main/scala/akka/japi/JavaAPI.scala index b37cee26fe..66e56cbb6f 100644 --- a/akka-actor/src/main/scala/akka/japi/JavaAPI.scala +++ b/akka-actor/src/main/scala/akka/japi/JavaAPI.scala @@ -113,8 +113,6 @@ abstract class JavaPartialFunction[A, B] extends AbstractPartialFunction[A, B] { * This class represents optional values. Instances of Option * are either instances of case class Some or it is case * object None. - *

- * Java API */ sealed abstract class Option[A] extends java.lang.Iterable[A] { def get: A @@ -179,24 +177,23 @@ object Util { /** * Returns a ClassTag describing the provided Class. - * - * Java API */ def classTag[T](clazz: Class[T]): ClassTag[T] = ClassTag(clazz) /** * Returns an immutable.Seq representing the provided array of Classes, * an overloading of the generic immutableSeq in Util, to accommodate for erasure. - * - * Java API */ def immutableSeq(arr: Array[Class[_]]): immutable.Seq[Class[_]] = immutableSeq[Class[_]](arr) /** - * + * Turns an array into an immutable Scala sequence (by copying it). */ def immutableSeq[T](arr: Array[T]): immutable.Seq[T] = if ((arr ne null) && arr.length > 0) Vector(arr: _*) else Nil + /** + * Turns an [[java.lang.Iterable]] into an immutable Scala sequence (by copying it). + */ def immutableSeq[T](iterable: java.lang.Iterable[T]): immutable.Seq[T] = iterable match { case imm: immutable.Seq[_] ⇒ imm.asInstanceOf[immutable.Seq[T]] diff --git a/akka-actor/src/main/scala/akka/pattern/CircuitBreaker.scala b/akka-actor/src/main/scala/akka/pattern/CircuitBreaker.scala index 628b847700..c15f03f0b2 100644 --- a/akka-actor/src/main/scala/akka/pattern/CircuitBreaker.scala +++ b/akka-actor/src/main/scala/akka/pattern/CircuitBreaker.scala @@ -21,6 +21,8 @@ import akka.dispatch.ExecutionContexts.sameThreadExecutionContext object CircuitBreaker { /** + * Create a new CircuitBreaker. + * * Callbacks run in caller's thread when using withSyncCircuitBreaker, and in same ExecutionContext as the passed * in Future when using withCircuitBreaker. To use another ExecutionContext for the callbacks you can specify the * executor in the constructor. @@ -34,10 +36,11 @@ object CircuitBreaker { new CircuitBreaker(scheduler, maxFailures, callTimeout, resetTimeout)(sameThreadExecutionContext) /** + * Java API: Create a new CircuitBreaker. + * * Callbacks run in caller's thread when using withSyncCircuitBreaker, and in same ExecutionContext as the passed * in Future when using withCircuitBreaker. To use another ExecutionContext for the callbacks you can specify the * executor in the constructor. - * Java API alias for apply * * @param scheduler Reference to Akka scheduler * @param maxFailures Maximum number of failures before opening the circuit @@ -110,7 +113,7 @@ class CircuitBreaker(scheduler: Scheduler, maxFailures: Int, callTimeout: Finite def withCircuitBreaker[T](body: ⇒ Future[T]): Future[T] = currentState.invoke(body) /** - * Java API for withCircuitBreaker + * Java API for [[#withCircuitBreaker]] * * @param body Call needing protected * @tparam T return type from call @@ -133,7 +136,7 @@ class CircuitBreaker(scheduler: Scheduler, maxFailures: Int, callTimeout: Finite callTimeout) /** - * Java API for withSyncCircuitBreaker + * Java API for [[#withSyncCircuitBreaker]] * * @param body Call needing protected * @tparam T return type from call diff --git a/akka-actor/src/main/scala/akka/routing/ConsistentHash.scala b/akka-actor/src/main/scala/akka/routing/ConsistentHash.scala index c98fd7031c..8165db2720 100644 --- a/akka-actor/src/main/scala/akka/routing/ConsistentHash.scala +++ b/akka-actor/src/main/scala/akka/routing/ConsistentHash.scala @@ -41,10 +41,9 @@ class ConsistentHash[T: ClassTag] private (nodes: immutable.SortedMap[Int, T], v new ConsistentHash(nodes ++ ((1 to virtualNodesFactor) map { r ⇒ (nodeHashFor(node, r) -> node) }), virtualNodesFactor) /** - * Adds a node to the node ring. + * Java API: Adds a node to the node ring. * Note that the instance is immutable and this * operation returns a new instance. - * JAVA API */ def add(node: T): ConsistentHash[T] = this :+ node @@ -57,10 +56,9 @@ class ConsistentHash[T: ClassTag] private (nodes: immutable.SortedMap[Int, T], v new ConsistentHash(nodes -- ((1 to virtualNodesFactor) map { r ⇒ nodeHashFor(node, r) }), virtualNodesFactor) /** - * Removes a node from the node ring. + * Java API: Removes a node from the node ring. * Note that the instance is immutable and this * operation returns a new instance. - * JAVA API */ def remove(node: T): ConsistentHash[T] = this :- node @@ -112,8 +110,7 @@ object ConsistentHash { } /** - * Factory method to create a ConsistentHash - * JAVA API + * Java API: Factory method to create a ConsistentHash */ def create[T](nodes: java.lang.Iterable[T], virtualNodesFactor: Int): ConsistentHash[T] = { import scala.collection.JavaConverters._ diff --git a/akka-actor/src/main/scala/akka/routing/ConsistentHashingRouter.scala b/akka-actor/src/main/scala/akka/routing/ConsistentHashingRouter.scala index a7a5c43e2e..0f1ec8c72f 100644 --- a/akka-actor/src/main/scala/akka/routing/ConsistentHashingRouter.scala +++ b/akka-actor/src/main/scala/akka/routing/ConsistentHashingRouter.scala @@ -151,22 +151,20 @@ case class ConsistentHashingRouter( extends RouterConfig with ConsistentHashingLike { /** - * Constructor that sets nrOfInstances to be created. - * Java API + * Java API: Constructor that sets nrOfInstances to be created. */ def this(nr: Int) = this(nrOfInstances = nr) /** - * Constructor that sets the routees to be used. - * Java API + * Java API: Constructor that sets the routees to be used. + * * @param routeePaths string representation of the actor paths of the routees that will be looked up * using `actorFor` in [[akka.actor.ActorRefProvider]] */ def this(routeePaths: java.lang.Iterable[String]) = this(routees = immutableSeq(routeePaths)) /** - * Constructor that sets the resizer to be used. - * Java API + * Java API: Constructor that sets the resizer to be used. */ def this(resizer: Resizer) = this(resizer = Some(resizer)) diff --git a/akka-actor/src/main/scala/akka/routing/Routing.scala b/akka-actor/src/main/scala/akka/routing/Routing.scala index 14d2de39a9..2d2a84c444 100644 --- a/akka-actor/src/main/scala/akka/routing/Routing.scala +++ b/akka-actor/src/main/scala/akka/routing/Routing.scala @@ -236,11 +236,10 @@ class RouteeProvider(val context: ActorContext, val routeeProps: Props, val resi def registerRoutees(routees: immutable.Iterable[ActorRef]): Unit = routedCell.addRoutees(routees) /** - * Adds the routees to the router. + * Java API: Adds the routees to the router. * Adds death watch of the routees so that they are removed when terminated. * Not thread safe, but intended to be called from protected points, such as * `RouterConfig.createRoute` and `Resizer.resize`. - * Java API. */ def registerRoutees(routees: java.lang.Iterable[ActorRef]): Unit = registerRoutees(immutableSeq(routees)) @@ -253,11 +252,10 @@ class RouteeProvider(val context: ActorContext, val routeeProps: Props, val resi def unregisterRoutees(routees: immutable.Iterable[ActorRef]): Unit = routedCell.removeRoutees(routees) /** - * Removes routees from the router. This method doesn't stop the routees. + * Java API: Removes routees from the router. This method doesn't stop the routees. * Removes death watch of the routees. * Not thread safe, but intended to be called from protected points, such as * `Resizer.resize`. - * JAVA API */ def unregisterRoutees(routees: java.lang.Iterable[ActorRef]): Unit = unregisterRoutees(immutableSeq(routees)) @@ -267,8 +265,7 @@ class RouteeProvider(val context: ActorContext, val routeeProps: Props, val resi def registerRouteesFor(paths: immutable.Iterable[String]): Unit = registerRoutees(paths.map(context.actorFor(_))) /** - * Looks up routes with specified paths and registers them. - * JAVA API + * Java API: Looks up routes with specified paths and registers them. */ def registerRouteesFor(paths: java.lang.Iterable[String]): Unit = registerRouteesFor(immutableSeq(paths)) @@ -321,8 +318,7 @@ class RouteeProvider(val context: ActorContext, val routeeProps: Props, val resi def routees: immutable.IndexedSeq[ActorRef] = routedCell.routees /** - * All routees of the router - * JAVA API + * Java API: All routees of the router */ def getRoutees(): java.util.List[ActorRef] = routees.asJava @@ -347,12 +343,13 @@ abstract class CustomRouterConfig extends RouterConfig { } +/** + * Java API helper for creating a single-destination routing. + */ trait CustomRoute { /** * use akka.japi.Util.immutableSeq to convert a java.lang.Iterable to the return type needed for destinationsFor, * or if you just want to return a single Destination, use akka.japi.Util.immutableSingletonSeq - * - * Java API */ def destinationsFor(sender: ActorRef, message: Any): immutable.Seq[Destination] } @@ -561,22 +558,20 @@ case class RoundRobinRouter(nrOfInstances: Int = 0, routees: immutable.Iterable[ extends RouterConfig with RoundRobinLike { /** - * Constructor that sets nrOfInstances to be created. - * Java API + * Java API: Constructor that sets nrOfInstances to be created. */ def this(nr: Int) = this(nrOfInstances = nr) /** - * Constructor that sets the routees to be used. - * Java API + * Java API: Constructor that sets the routees to be used. + * * @param routeePaths string representation of the actor paths of the routees that will be looked up * using `actorFor` in [[akka.actor.ActorRefProvider]] */ def this(routeePaths: java.lang.Iterable[String]) = this(routees = immutableSeq(routeePaths)) /** - * Constructor that sets the resizer to be used. - * Java API + * Java API: Constructor that sets the resizer to be used. */ def this(resizer: Resizer) = this(resizer = Some(resizer)) @@ -696,22 +691,20 @@ case class RandomRouter(nrOfInstances: Int = 0, routees: immutable.Iterable[Stri extends RouterConfig with RandomLike { /** - * Constructor that sets nrOfInstances to be created. - * Java API + * Java API: Constructor that sets nrOfInstances to be created. */ def this(nr: Int) = this(nrOfInstances = nr) /** - * Constructor that sets the routees to be used. - * Java API + * Java API: Constructor that sets the routees to be used. + * * @param routeePaths string representation of the actor paths of the routees that will be looked up * using `actorFor` in [[akka.actor.ActorRefProvider]] */ def this(routeePaths: java.lang.Iterable[String]) = this(routees = immutableSeq(routeePaths)) /** - * Constructor that sets the resizer to be used. - * Java API + * Java API: Constructor that sets the resizer to be used. */ def this(resizer: Resizer) = this(resizer = Some(resizer)) @@ -838,22 +831,20 @@ case class SmallestMailboxRouter(nrOfInstances: Int = 0, routees: immutable.Iter extends RouterConfig with SmallestMailboxLike { /** - * Constructor that sets nrOfInstances to be created. - * Java API + * Java API: Constructor that sets nrOfInstances to be created. */ def this(nr: Int) = this(nrOfInstances = nr) /** - * Constructor that sets the routees to be used. - * Java API + * Java API: Constructor that sets the routees to be used. + * * @param routeePaths string representation of the actor paths of the routees that will be looked up * using `actorFor` in [[akka.actor.ActorRefProvider]] */ def this(routeePaths: java.lang.Iterable[String]) = this(routees = immutableSeq(routeePaths)) /** - * Constructor that sets the resizer to be used. - * Java API + * Java API: Constructor that sets the resizer to be used. */ def this(resizer: Resizer) = this(resizer = Some(resizer)) @@ -1055,22 +1046,20 @@ case class BroadcastRouter(nrOfInstances: Int = 0, routees: immutable.Iterable[S extends RouterConfig with BroadcastLike { /** - * Constructor that sets nrOfInstances to be created. - * Java API + * Java API: Constructor that sets nrOfInstances to be created. */ def this(nr: Int) = this(nrOfInstances = nr) /** - * Constructor that sets the routees to be used. - * Java API + * Java API: Constructor that sets the routees to be used. + * * @param routeePaths string representation of the actor paths of the routees that will be looked up * using `actorFor` in [[akka.actor.ActorRefProvider]] */ def this(routeePaths: java.lang.Iterable[String]) = this(routees = immutableSeq(routeePaths)) /** - * Constructor that sets the resizer to be used. - * Java API + * Java API: Constructor that sets the resizer to be used. */ def this(resizer: Resizer) = this(resizer = Some(resizer)) @@ -1185,22 +1174,20 @@ case class ScatterGatherFirstCompletedRouter(nrOfInstances: Int = 0, routees: im "[within: Duration] can not be zero or negative, was [" + within + "]") /** - * Constructor that sets nrOfInstances to be created. - * Java API + * Java API: Constructor that sets nrOfInstances to be created. */ def this(nr: Int, w: FiniteDuration) = this(nrOfInstances = nr, within = w) /** - * Constructor that sets the routees to be used. - * Java API + * Java API: Constructor that sets the routees to be used. + * * @param routeePaths string representation of the actor paths of the routees that will be looked up * using `actorFor` in [[akka.actor.ActorRefProvider]] */ def this(routeePaths: java.lang.Iterable[String], w: FiniteDuration) = this(routees = immutableSeq(routeePaths), within = w) /** - * Constructor that sets the resizer to be used. - * Java API + * Java API: Constructor that sets the resizer to be used. */ def this(resizer: Resizer, w: FiniteDuration) = this(resizer = Some(resizer), within = w) diff --git a/akka-actor/src/main/scala/akka/serialization/Serializer.scala b/akka-actor/src/main/scala/akka/serialization/Serializer.scala index 736a4a6175..ed3b7a366f 100644 --- a/akka-actor/src/main/scala/akka/serialization/Serializer.scala +++ b/akka-actor/src/main/scala/akka/serialization/Serializer.scala @@ -103,7 +103,8 @@ object JavaSerializer { val currentSystem = new CurrentSystem final class CurrentSystem extends DynamicVariable[ExtendedActorSystem](null) { /** - * Java API + * Java API: invoke the callable with the current system being set to the given value for this thread. + * * @param value - the current value under the call to callable.call() * @param callable - the operation to be performed * @tparam S - the return type diff --git a/akka-actor/src/main/scala/akka/util/ByteString.scala b/akka-actor/src/main/scala/akka/util/ByteString.scala index 7905a15e42..39639ae5f4 100644 --- a/akka-actor/src/main/scala/akka/util/ByteString.scala +++ b/akka-actor/src/main/scala/akka/util/ByteString.scala @@ -307,7 +307,8 @@ sealed abstract class ByteString extends IndexedSeq[Byte] with IndexedSeqOptimiz override def indexOf[B >: Byte](elem: B): Int = iterator.indexOf(elem) /** - * JAVA API + * Java API: copy this ByteString into a fresh byte array + * * @return this ByteString copied into a byte array */ protected[ByteString] def toArray: Array[Byte] = toArray[Byte] // protected[ByteString] == public to Java but hidden to Scala * fnizz * @@ -355,18 +356,14 @@ sealed abstract class ByteString extends IndexedSeq[Byte] with IndexedSeqOptimiz def asByteBuffer: ByteBuffer /** - * Returns an immutable Iterable of read-only ByteBuffers that directly wraps this ByteStrings + * Scala API: Returns an immutable Iterable of read-only ByteBuffers that directly wraps this ByteStrings * all fragments. Will always have at least one entry. - * - * Scala API */ def asByteBuffers: immutable.Iterable[ByteBuffer] /** - * Returns an Iterable of read-only ByteBuffers that directly wraps this ByteStrings + * Java API: Returns an Iterable of read-only ByteBuffers that directly wraps this ByteStrings * all fragments. Will always have at least one entry. - * - * Java API */ def getByteBuffers(): JIterable[ByteBuffer] = { import scala.collection.JavaConverters.asJavaIterableConverter diff --git a/akka-agent/src/main/scala/akka/agent/Agent.scala b/akka-agent/src/main/scala/akka/agent/Agent.scala index 61bb5e73b3..c639b33837 100644 --- a/akka-agent/src/main/scala/akka/agent/Agent.scala +++ b/akka-agent/src/main/scala/akka/agent/Agent.scala @@ -15,8 +15,7 @@ object Agent { def apply[T](initialValue: T)(implicit context: ExecutionContext): Agent[T] = new SecretAgent(initialValue, context) /** - * Java API - * Factory method for creating an Agent. + * Java API: Factory method for creating an Agent. */ def create[T](initialValue: T, context: ExecutionContext): Agent[T] = Agent(initialValue)(context) @@ -161,8 +160,7 @@ object Agent { abstract class Agent[T] { /** - * Read the internal state of the agent. - * Java API + * Java API: Read the internal state of the agent. */ def get(): T diff --git a/akka-camel/src/main/scala/akka/camel/CamelMessage.scala b/akka-camel/src/main/scala/akka/camel/CamelMessage.scala index f6b5073534..f39d542e1d 100644 --- a/akka-camel/src/main/scala/akka/camel/CamelMessage.scala +++ b/akka-camel/src/main/scala/akka/camel/CamelMessage.scala @@ -26,27 +26,21 @@ case class CamelMessage(body: Any, headers: Map[String, Any]) { def headers(names: Set[String]): Map[String, Any] = headers filterKeys names /** - * Returns those headers from this message whose name is contained in names. + * Java API: Returns those headers from this message whose name is contained in names. * The returned headers map is backed up by an immutable headers map. Any attempt to modify * the returned map will throw an exception. - *

- * Java API */ def getHeaders(names: JSet[String]): JMap[String, Any] = headers(names.toSet) /** - * Returns all headers from this message. The returned headers map is backed up by this + * Java API: Returns all headers from this message. The returned headers map is backed up by this * message's immutable headers map. Any attempt to modify the returned map will throw an * exception. - *

- * Java API */ def getHeaders: JMap[String, Any] = headers /** - * Creates a new CamelMessage with given headers. A copy of the headers map is made. - *

- * Java API + * Java API: Creates a new CamelMessage with given headers. A copy of the headers map is made. */ def withHeaders[A](headers: JMap[String, A]): CamelMessage = copy(this.body, headers.toMap) @@ -64,13 +58,11 @@ case class CamelMessage(body: Any, headers: Map[String, Any]) { Try(headers.get(name).map(camelContext.getTypeConverter.mandatoryConvertTo[T](t.runtimeClass.asInstanceOf[Class[T]], _)).getOrElse(throw new NoSuchElementException(name))) /** - * Returns the header by given name parameter. The header is converted to type T as defined by the clazz parameter. + * Java API: Returns the header by given name parameter. The header is converted to type T as defined by the clazz parameter. * An exception is thrown when the conversion to the type T fails or when the header cannot be found. *

* The CamelContext is accessible in a [[akka.camel.javaapi.UntypedConsumerActor]] and [[akka.camel.javaapi.UntypedProducerActor]] * using the `getCamelContext` method, and is available on the [[akka.camel.CamelExtension]]. - *

- * Java API */ def getHeaderAs[T](name: String, clazz: Class[T], camelContext: CamelContext): T = headerAs[T](name)(ClassTag(clazz), camelContext).get @@ -81,10 +73,8 @@ case class CamelMessage(body: Any, headers: Map[String, Any]) { def mapBody[A, B](transformer: A ⇒ B): CamelMessage = copy(body = transformer(body.asInstanceOf[A])) /** - * Returns a new CamelMessage with a transformed body using a transformer function. + * Java API: Returns a new CamelMessage with a transformed body using a transformer function. * This method will throw a [[java.lang.ClassCastException]] if the body cannot be mapped to type A. - *

- * Java API */ def mapBody[A, B](transformer: Mapper[A, B]): CamelMessage = copy(body = transformer(body.asInstanceOf[A])) @@ -97,15 +87,12 @@ case class CamelMessage(body: Any, headers: Map[String, Any]) { def bodyAs[T](implicit t: ClassTag[T], camelContext: CamelContext): T = getBodyAs(t.runtimeClass.asInstanceOf[Class[T]], camelContext) /** - * Returns the body of the message converted to the type as given by the clazz + * Java API: Returns the body of the message converted to the type as given by the clazz * parameter. Conversion is done using Camel's type converter. The type converter is obtained * from the CamelContext that is passed in. *

* The CamelContext is accessible in a [[akka.camel.javaapi.UntypedConsumerActor]] and [[akka.camel.javaapi.UntypedProducerActor]] * using the `getCamelContext` method, and is available on the [[akka.camel.CamelExtension]]. - *

- * Java API - * */ def getBodyAs[T](clazz: Class[T], camelContext: CamelContext): T = { val result = camelContext.getTypeConverter.mandatoryConvertTo[T](clazz, body) @@ -124,9 +111,7 @@ case class CamelMessage(body: Any, headers: Map[String, Any]) { } /** - * Returns a new CamelMessage with a new body, while keeping the same headers. - *

- * Java API + * Java API: Returns a new CamelMessage with a new body, while keeping the same headers. */ def withBody[T](body: T) = this.copy(body = body) /** @@ -137,12 +122,10 @@ case class CamelMessage(body: Any, headers: Map[String, Any]) { def withBodyAs[T](implicit t: ClassTag[T], camelContext: CamelContext): CamelMessage = withBodyAs(t.runtimeClass.asInstanceOf[Class[T]]) /** - * Creates a CamelMessage with current body converted to type clazz. + * Java API: Creates a CamelMessage with current body converted to type clazz. *

* The CamelContext is accessible in a [[akka.camel.javaapi.UntypedConsumerActor]] and [[akka.camel.javaapi.UntypedProducerActor]] * using the `getCamelContext` method, and is available on the [[akka.camel.CamelExtension]]. - *

- * Java API */ def withBodyAs[T](clazz: Class[T])(implicit camelContext: CamelContext): CamelMessage = copy(body = getBodyAs(clazz, camelContext)) diff --git a/akka-camel/src/main/scala/akka/camel/Consumer.scala b/akka-camel/src/main/scala/akka/camel/Consumer.scala index dfbe3ac840..c60830943b 100644 --- a/akka-camel/src/main/scala/akka/camel/Consumer.scala +++ b/akka-camel/src/main/scala/akka/camel/Consumer.scala @@ -71,7 +71,7 @@ trait Consumer extends Actor with CamelSupport { } /** - * Java API. Returns the [[akka.dispatch.Mapper]] function that will be used as a route definition handler + * Java API: Returns the [[akka.dispatch.Mapper]] function that will be used as a route definition handler * for creating custom route to this consumer. By default it returns an identity function, override this method to * return a custom route definition handler. The [[akka.dispatch.Mapper]] is not allowed to close over 'this', meaning it is * not allowed to refer to the actor instance itself, since that can easily cause concurrent shared state issues. diff --git a/akka-camel/src/main/scala/akka/camel/javaapi/UntypedConsumerActor.scala b/akka-camel/src/main/scala/akka/camel/javaapi/UntypedConsumerActor.scala index 7bfa26ce20..4e407d4933 100644 --- a/akka-camel/src/main/scala/akka/camel/javaapi/UntypedConsumerActor.scala +++ b/akka-camel/src/main/scala/akka/camel/javaapi/UntypedConsumerActor.scala @@ -17,24 +17,24 @@ abstract class UntypedConsumerActor extends UntypedActor with Consumer { final def endpointUri: String = getEndpointUri /** - * ''Java API'': Returns the Camel endpoint URI to consume messages from. + * Java API: Returns the Camel endpoint URI to consume messages from. */ def getEndpointUri(): String /** - * ''Java API'': Returns the [[org.apache.camel.impl.DefaultCamelContext]] + * Java API: Returns the [[org.apache.camel.impl.DefaultCamelContext]] * @return the CamelContext */ protected def getCamelContext(): DefaultCamelContext = camelContext /** - * ''Java API'': Returns the [[org.apache.camel.ProducerTemplate]] + * Java API: Returns the [[org.apache.camel.ProducerTemplate]] * @return the ProducerTemplate */ protected def getProducerTemplate(): ProducerTemplate = camel.template /** - * ''Java API'': Returns the [[akka.camel.Activation]] interface + * Java API: Returns the [[akka.camel.Activation]] interface * that can be used to wait on activation or de-activation of Camel endpoints. * @return the Activation interface */ diff --git a/akka-cluster/src/main/scala/akka/cluster/Cluster.scala b/akka-cluster/src/main/scala/akka/cluster/Cluster.scala index 79513d9764..4c2f39df73 100644 --- a/akka-cluster/src/main/scala/akka/cluster/Cluster.scala +++ b/akka-cluster/src/main/scala/akka/cluster/Cluster.scala @@ -250,11 +250,10 @@ class Cluster(val system: ExtendedActorSystem) extends Extension { registerOnMemberUp(new Runnable { def run = code }) /** - * The supplied callback will be run, once, when current cluster member is `Up`. + * Java API: The supplied callback will be run, once, when current cluster member is `Up`. * Typically used together with configuration option `akka.cluster.min-nr-of-members' * to defer some action, such as starting actors, until the cluster has reached * a certain size. - * JAVA API */ def registerOnMemberUp(callback: Runnable): Unit = clusterDaemons ! InternalClusterAction.AddOnMemberUpListener(callback) diff --git a/akka-cluster/src/main/scala/akka/cluster/ClusterEvent.scala b/akka-cluster/src/main/scala/akka/cluster/ClusterEvent.scala index 393f71cc57..809694588f 100644 --- a/akka-cluster/src/main/scala/akka/cluster/ClusterEvent.scala +++ b/akka-cluster/src/main/scala/akka/cluster/ClusterEvent.scala @@ -38,8 +38,7 @@ object ClusterEvent { leader: Option[Address] = None) extends ClusterDomainEvent { /** - * Java API - * Read only + * Java API: get current member list. */ def getMembers: java.lang.Iterable[Member] = { import scala.collection.JavaConverters._ @@ -47,22 +46,19 @@ object ClusterEvent { } /** - * Java API - * Read only + * Java API: get current unreachable set. */ def getUnreachable: java.util.Set[Member] = scala.collection.JavaConverters.setAsJavaSetConverter(unreachable).asJava /** - * Java API - * Read only + * Java API: get current “seen-by” set. */ def getSeenBy: java.util.Set[Address] = scala.collection.JavaConverters.setAsJavaSetConverter(seenBy).asJava /** - * Java API - * @return address of current leader, or null if none + * Java API: get address of current leader, or null if none */ def getLeader: Address = leader orNull } @@ -137,8 +133,7 @@ object ClusterEvent { extends ClusterDomainEvent { /** - * Java API - * Read only + * Java API: get current member list */ def getMembers: java.lang.Iterable[Member] = { import scala.collection.JavaConverters._ diff --git a/akka-cluster/src/main/scala/akka/cluster/Member.scala b/akka-cluster/src/main/scala/akka/cluster/Member.scala index 141018834e..c2868c9335 100644 --- a/akka-cluster/src/main/scala/akka/cluster/Member.scala +++ b/akka-cluster/src/main/scala/akka/cluster/Member.scala @@ -99,32 +99,32 @@ object MemberStatus { case object Removed extends MemberStatus /** - * JAVA API + * Java API: retrieve the “joining” status singleton */ def joining: MemberStatus = Joining /** - * JAVA API + * Java API: retrieve the “up” status singleton */ def up: MemberStatus = Up /** - * JAVA API + * Java API: retrieve the “leaving” status singleton */ def leaving: MemberStatus = Leaving /** - * JAVA API + * Java API: retrieve the “exiting” status singleton */ def exiting: MemberStatus = Exiting /** - * JAVA API + * Java API: retrieve the “down” status singleton */ def down: MemberStatus = Down /** - * JAVA API + * Java API: retrieve the “removed” status singleton */ def removed: MemberStatus = Removed } diff --git a/akka-cluster/src/main/scala/akka/cluster/routing/AdaptiveLoadBalancingRouter.scala b/akka-cluster/src/main/scala/akka/cluster/routing/AdaptiveLoadBalancingRouter.scala index ab86177275..6c3d7a00a0 100644 --- a/akka-cluster/src/main/scala/akka/cluster/routing/AdaptiveLoadBalancingRouter.scala +++ b/akka-cluster/src/main/scala/akka/cluster/routing/AdaptiveLoadBalancingRouter.scala @@ -79,16 +79,16 @@ case class AdaptiveLoadBalancingRouter( extends RouterConfig with AdaptiveLoadBalancingRouterLike { /** - * Constructor that sets nrOfInstances to be created. - * Java API + * Java API: Constructor that sets nrOfInstances to be created. + * * @param selector the selector is responsible for producing weighted mix of routees from the node metrics * @param nr number of routees to create */ def this(selector: MetricsSelector, nr: Int) = this(metricsSelector = selector, nrOfInstances = nr) /** - * Constructor that sets the routees to be used. - * Java API + * Java API: Constructor that sets the routees to be used. + * * @param selector the selector is responsible for producing weighted mix of routees from the node metrics * @param routeePaths string representation of the actor paths of the routees that will be looked up * using `actorFor` in [[akka.actor.ActorRefProvider]] @@ -97,8 +97,8 @@ case class AdaptiveLoadBalancingRouter( this(metricsSelector = selector, routees = immutableSeq(routeePaths)) /** - * Constructor that sets the resizer to be used. - * Java API + * Java API: Constructor that sets the resizer to be used. + * * @param selector the selector is responsible for producing weighted mix of routees from the node metrics */ def this(selector: MetricsSelector, resizer: Resizer) = @@ -307,7 +307,7 @@ abstract class MixMetricsSelectorBase(selectors: immutable.IndexedSeq[CapacityMe extends CapacityMetricsSelector { /** - * Java API + * Java API: construct a mix-selector from a sequence of selectors */ def this(selectors: java.lang.Iterable[CapacityMetricsSelector]) = this(immutableSeq(selectors).toVector) diff --git a/akka-cluster/src/main/scala/akka/cluster/routing/ClusterRouterConfig.scala b/akka-cluster/src/main/scala/akka/cluster/routing/ClusterRouterConfig.scala index 4b6c3b5c30..1eb8b7a712 100644 --- a/akka-cluster/src/main/scala/akka/cluster/routing/ClusterRouterConfig.scala +++ b/akka-cluster/src/main/scala/akka/cluster/routing/ClusterRouterConfig.scala @@ -109,15 +109,13 @@ case class ClusterRouterSettings private[akka] ( allowLocalRoutees: Boolean) { /** - * Settings for create and deploy of the routees - * JAVA API + * Java API: Settings for create and deploy of the routees */ def this(totalInstances: Int, maxInstancesPerNode: Int, allowLocalRoutees: Boolean) = this(totalInstances, maxInstancesPerNode, routeesPath = "", allowLocalRoutees) /** - * Settings for lookup of the routees - * JAVA API + * Java API: Settings for lookup of the routees */ def this(totalInstances: Int, routeesPath: String, allowLocalRoutees: Boolean) = this(totalInstances, maxInstancesPerNode = 1, routeesPath, allowLocalRoutees) diff --git a/akka-testkit/src/main/scala/akka/testkit/TestActorRef.scala b/akka-testkit/src/main/scala/akka/testkit/TestActorRef.scala index 3d2030e0e4..043be02744 100644 --- a/akka-testkit/src/main/scala/akka/testkit/TestActorRef.scala +++ b/akka-testkit/src/main/scala/akka/testkit/TestActorRef.scala @@ -148,7 +148,7 @@ object TestActorRef { }), name) /** - * Java API + * Java API: create a TestActorRef in the given system for the given props */ def create[T <: Actor](system: ActorSystem, props: Props, name: String): TestActorRef[T] = apply(props, name)(system) } diff --git a/akka-testkit/src/main/scala/akka/testkit/TestEventListener.scala b/akka-testkit/src/main/scala/akka/testkit/TestEventListener.scala index fc9fb51104..57e3230e98 100644 --- a/akka-testkit/src/main/scala/akka/testkit/TestEventListener.scala +++ b/akka-testkit/src/main/scala/akka/testkit/TestEventListener.scala @@ -43,7 +43,7 @@ object TestEvent { } case class Mute(filters: immutable.Seq[EventFilter]) extends TestEvent with NoSerializationVerificationNeeded { /** - * Java API + * Java API: create a Mute command from a list of filters */ def this(filters: JIterable[EventFilter]) = this(immutableSeq(filters)) } @@ -52,7 +52,7 @@ object TestEvent { } case class UnMute(filters: immutable.Seq[EventFilter]) extends TestEvent with NoSerializationVerificationNeeded { /** - * Java API + * Java API: create an UnMute command from a list of filters */ def this(filters: JIterable[EventFilter]) = this(immutableSeq(filters)) } @@ -277,7 +277,7 @@ case class ErrorFilter( } /** - * Java API + * Java API: create an ErrorFilter * * @param source * apply this filter only to events from the given source; do not filter on source if this is given as null @@ -326,7 +326,7 @@ case class WarningFilter( } /** - * Java API + * Java API: create a WarningFilter * * @param source * apply this filter only to events from the given source; do not filter on source if this is given as null @@ -369,7 +369,7 @@ case class InfoFilter( } /** - * Java API + * Java API: create an InfoFilter * * @param source * apply this filter only to events from the given source; do not filter on source if this is given as null @@ -412,7 +412,7 @@ case class DebugFilter( } /** - * Java API + * Java API: create a DebugFilter * * @param source * apply this filter only to events from the given source; do not filter on source if this is given as null diff --git a/akka-testkit/src/main/scala/akka/testkit/TestKit.scala b/akka-testkit/src/main/scala/akka/testkit/TestKit.scala index cbbc4ad470..da6b1363d3 100644 --- a/akka-testkit/src/main/scala/akka/testkit/TestKit.scala +++ b/akka-testkit/src/main/scala/akka/testkit/TestKit.scala @@ -679,7 +679,7 @@ object TestKit { def now: Duration = System.nanoTime().nanos /** - * Java API. Scale timeouts (durations) during tests with the configured + * Java API: Scale timeouts (durations) during tests with the configured * 'akka.test.timefactor'. */ def dilated(duration: Duration, system: ActorSystem): Duration = diff --git a/akka-transactor/src/main/scala/akka/transactor/Transactor.scala b/akka-transactor/src/main/scala/akka/transactor/Transactor.scala index f115d3500c..71578d5ca9 100644 --- a/akka-transactor/src/main/scala/akka/transactor/Transactor.scala +++ b/akka-transactor/src/main/scala/akka/transactor/Transactor.scala @@ -92,7 +92,7 @@ case class SendTo(actor: ActorRef, message: Option[Any] = None) * can implement normal actor behavior, or use the normal STM atomic for * local transactions. * - * @see [[akka.transactor.Coordinated]] for more information about the underlying mechanism + * @see [[akka.transactor.Coordinated]] */ trait Transactor extends Actor { private val settings = TransactorExtension(context.system) diff --git a/akka-zeromq/src/main/scala/akka/zeromq/SocketOption.scala b/akka-zeromq/src/main/scala/akka/zeromq/SocketOption.scala index f2375873ba..990fd48a2f 100644 --- a/akka-zeromq/src/main/scala/akka/zeromq/SocketOption.scala +++ b/akka-zeromq/src/main/scala/akka/zeromq/SocketOption.scala @@ -229,7 +229,8 @@ object ZMQMessage { if ((frames eq null) || frames.length == 0) empty else new ZMQMessage(frames.to[immutable.Seq]) /** - * Java API + * Java API: create a message from the given frames + * * @param frames the frames of the returned ZMQMessage * @return a ZMQMessage with the given frames */ diff --git a/akka-zeromq/src/main/scala/akka/zeromq/ZeroMQExtension.scala b/akka-zeromq/src/main/scala/akka/zeromq/ZeroMQExtension.scala index 2a31498e08..06d4a8c86d 100644 --- a/akka-zeromq/src/main/scala/akka/zeromq/ZeroMQExtension.scala +++ b/akka-zeromq/src/main/scala/akka/zeromq/ZeroMQExtension.scala @@ -72,64 +72,64 @@ class ZeroMQExtension(system: ActorSystem) extends Extension { } /** - * Java API helper - * Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Publisher socket actor. + * Java API: Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Publisher socket actor. + * * @param socketParameters a varargs list of [[akka.zeromq.SocketOption]] to configure the socket * @return the [[akka.actor.Props]] */ def newPubSocketProps(socketParameters: SocketOption*): Props = newSocketProps((SocketType.Pub +: socketParameters): _*) /** - * Java API helper - * Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Subscriber socket actor. + * Java API: Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Subscriber socket actor. + * * @param socketParameters a varargs list of [[akka.zeromq.SocketOption]] to configure the socket * @return the [[akka.actor.Props]] */ def newSubSocketProps(socketParameters: SocketOption*): Props = newSocketProps((SocketType.Sub +: socketParameters): _*) /** - * Java API helper - * Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Dealer socket actor. + * Java API: Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Dealer socket actor. + * * @param socketParameters a varargs list of [[akka.zeromq.SocketOption]] to configure the socket * @return the [[akka.actor.Props]] */ def newDealerSocketProps(socketParameters: SocketOption*): Props = newSocketProps((SocketType.Dealer +: socketParameters): _*) /** - * Java API helper - * Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Router socket actor. + * Java API: Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Router socket actor. + * * @param socketParameters a varargs list of [[akka.zeromq.SocketOption]] to configure the socket * @return the [[akka.actor.Props]] */ def newRouterSocketProps(socketParameters: SocketOption*): Props = newSocketProps((SocketType.Router +: socketParameters): _*) /** - * Java API helper - * Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Push socket actor. + * Java API: Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Push socket actor. + * * @param socketParameters a varargs list of [[akka.zeromq.SocketOption]] to configure the socket * @return the [[akka.actor.Props]] */ def newPushSocketProps(socketParameters: SocketOption*): Props = newSocketProps((SocketType.Push +: socketParameters): _*) /** - * Java API helper - * Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Pull socket actor. + * Java API: Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Pull socket actor. + * * @param socketParameters a varargs list of [[akka.zeromq.SocketOption]] to configure the socket * @return the [[akka.actor.Props]] */ def newPullSocketProps(socketParameters: SocketOption*): Props = newSocketProps((SocketType.Pull +: socketParameters): _*) /** - * Java API helper - * Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Req socket actor. + * Java API: Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Req socket actor. + * * @param socketParameters a varargs list of [[akka.zeromq.SocketOption]] to configure the socket * @return the [[akka.actor.Props]] */ def newReqSocketProps(socketParameters: SocketOption*): Props = newSocketProps((SocketType.Rep +: socketParameters): _*) /** - * Java API helper - * Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Rep socket actor. + * Java API: Factory method to create the [[akka.actor.Props]] to build a ZeroMQ Rep socket actor. + * * @param socketParameters a varargs list of [[akka.zeromq.SocketOption]] to configure the socket * @return the [[akka.actor.Props]] */ diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index 2f2c5a15df..517adebe92 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -879,7 +879,7 @@ object Dependencies { val sigar = "org.fusesource" % "sigar" % "1.6.4" // ApacheV2 // Compiler plugins - val genjavadoc = compilerPlugin("com.typesafe.genjavadoc" %% "genjavadoc-plugin" % "0.2" cross CrossVersion.full) // ApacheV2 + val genjavadoc = compilerPlugin("com.typesafe.genjavadoc" %% "genjavadoc-plugin" % "0.3" cross CrossVersion.full) // ApacheV2 // Test