diff --git a/akka-actor/src/main/scala/akka/actor/ActorRef.scala b/akka-actor/src/main/scala/akka/actor/ActorRef.scala index 08e99206c2..e2c391e300 100644 --- a/akka-actor/src/main/scala/akka/actor/ActorRef.scala +++ b/akka-actor/src/main/scala/akka/actor/ActorRef.scala @@ -109,7 +109,7 @@ trait ActorRef extends ActorRefShared with java.lang.Comparable[ActorRef] { scal * Defines the default timeout for '!!' and '!!!' invocations, * e.g. the timeout for the future returned by the call to '!!' and '!!!'. */ - @deprecated("Will be replaced by implicit-scoped timeout on all methods that needs it, will default to timeout specified in config") + @deprecated("Will be replaced by implicit-scoped timeout on all methods that needs it, will default to timeout specified in config", "1.1") @BeanProperty @volatile var timeout: Long = Actor.TIMEOUT @@ -184,13 +184,13 @@ trait ActorRef extends ActorRefShared with java.lang.Comparable[ActorRef] { scal /** * Returns on which node this actor lives if None it lives in the local ActorRegistry */ - @deprecated("Remoting will become fully transparent in the future") + @deprecated("Remoting will become fully transparent in the future", "1.1") def homeAddress: Option[InetSocketAddress] /** * Java API.

*/ - @deprecated("Remoting will become fully transparent in the future") + @deprecated("Remoting will become fully transparent in the future", "1.1") def getHomeAddress(): InetSocketAddress = homeAddress getOrElse null /** @@ -256,7 +256,7 @@ trait ActorRef extends ActorRefShared with java.lang.Comparable[ActorRef] { scal /** * Is the actor able to handle the message passed in as arguments? */ - @deprecated("Will be removed without replacement, it's just not reliable in the face of `become` and `unbecome`") + @deprecated("Will be removed without replacement, it's just not reliable in the face of `become` and `unbecome`", "1.1") def isDefinedAt(message: Any): Boolean = actor.isDefinedAt(message) /** @@ -382,27 +382,27 @@ trait ActorRef extends ActorRefShared with java.lang.Comparable[ActorRef] { scal /** * Returns the class for the Actor instance that is managed by the ActorRef. */ - @deprecated("Will be removed without replacement, doesn't make any sense to have in the face of `become` and `unbecome`") + @deprecated("Will be removed without replacement, doesn't make any sense to have in the face of `become` and `unbecome`", "1.1") def actorClass: Class[_ <: Actor] /** * Akka Java API.

* Returns the class for the Actor instance that is managed by the ActorRef. */ - @deprecated("Will be removed without replacement, doesn't make any sense to have in the face of `become` and `unbecome`") + @deprecated("Will be removed without replacement, doesn't make any sense to have in the face of `become` and `unbecome`", "1.1") def getActorClass(): Class[_ <: Actor] = actorClass /** * Returns the class name for the Actor instance that is managed by the ActorRef. */ - @deprecated("Will be removed without replacement, doesn't make any sense to have in the face of `become` and `unbecome`") + @deprecated("Will be removed without replacement, doesn't make any sense to have in the face of `become` and `unbecome`", "1.1") def actorClassName: String /** * Akka Java API.

* Returns the class name for the Actor instance that is managed by the ActorRef. */ - @deprecated("Will be removed without replacement, doesn't make any sense to have in the face of `become` and `unbecome`") + @deprecated("Will be removed without replacement, doesn't make any sense to have in the face of `become` and `unbecome`", "1.1") def getActorClassName(): String = actorClassName /** @@ -456,7 +456,7 @@ trait ActorRef extends ActorRefShared with java.lang.Comparable[ActorRef] { scal *

* To be invoked from within the actor itself. */ - @deprecated("Will be removed after 1.1, use Actor.actorOf instead") + @deprecated("Will be removed after 1.1, use Actor.actorOf instead", "1.1") def spawn(clazz: Class[_ <: Actor]): ActorRef /** @@ -464,7 +464,7 @@ trait ActorRef extends ActorRefShared with java.lang.Comparable[ActorRef] { scal *

* To be invoked from within the actor itself. */ - @deprecated("Will be removed after 1.1, client managed actors will be removed") + @deprecated("Will be removed after 1.1, client managed actors will be removed", "1.1") def spawnRemote(clazz: Class[_ <: Actor], hostname: String, port: Int, timeout: Long): ActorRef /** @@ -472,7 +472,7 @@ trait ActorRef extends ActorRefShared with java.lang.Comparable[ActorRef] { scal *

* To be invoked from within the actor itself. */ - @deprecated("Will be removed after 1.1, use use Actor.remote.actorOf instead and then link on success") + @deprecated("Will be removed after 1.1, use use Actor.remote.actorOf instead and then link on success", "1.1") def spawnLink(clazz: Class[_ <: Actor]): ActorRef /** @@ -480,7 +480,7 @@ trait ActorRef extends ActorRefShared with java.lang.Comparable[ActorRef] { scal *

* To be invoked from within the actor itself. */ - @deprecated("Will be removed after 1.1, client managed actors will be removed") + @deprecated("Will be removed after 1.1, client managed actors will be removed", "1.1") def spawnLinkRemote(clazz: Class[_ <: Actor], hostname: String, port: Int, timeout: Long): ActorRef /** @@ -644,13 +644,13 @@ class LocalActorRef private[akka] ( /** * Returns the class for the Actor instance that is managed by the ActorRef. */ - @deprecated("Will be removed without replacement, doesn't make any sense to have in the face of `become` and `unbecome`") + @deprecated("Will be removed without replacement, doesn't make any sense to have in the face of `become` and `unbecome`", "1.1") def actorClass: Class[_ <: Actor] = actor.getClass.asInstanceOf[Class[_ <: Actor]] /** * Returns the class name for the Actor instance that is managed by the ActorRef. */ - @deprecated("Will be removed without replacement, doesn't make any sense to have in the face of `become` and `unbecome`") + @deprecated("Will be removed without replacement, doesn't make any sense to have in the face of `become` and `unbecome`", "1.1") def actorClassName: String = actorClass.getName /** @@ -1184,7 +1184,7 @@ private[akka] case class RemoteActorRef private[akka] ( protected[akka] def registerSupervisorAsRemoteActor: Option[Uuid] = None // ==== NOT SUPPORTED ==== - @deprecated("Will be removed without replacement, doesn't make any sense to have in the face of `become` and `unbecome`") + @deprecated("Will be removed without replacement, doesn't make any sense to have in the face of `become` and `unbecome`", "1.1") def actorClass: Class[_ <: Actor] = unsupported def dispatcher_=(md: MessageDispatcher): Unit = unsupported def dispatcher: MessageDispatcher = unsupported diff --git a/akka-actor/src/main/scala/akka/dataflow/DataFlow.scala b/akka-actor/src/main/scala/akka/dataflow/DataFlow.scala index 258bc4fff0..13438132e6 100644 --- a/akka-actor/src/main/scala/akka/dataflow/DataFlow.scala +++ b/akka-actor/src/main/scala/akka/dataflow/DataFlow.scala @@ -66,7 +66,7 @@ object DataFlow { /** * @author Jonas Bonér */ - @deprecated("Superceeded by Future and CompletableFuture as of 1.1") + @deprecated("Superceeded by Future and CompletableFuture as of 1.1", "1.1") sealed class DataFlowVariable[T <: Any](timeoutMs: Long) { import DataFlowVariable._ diff --git a/akka-actor/src/main/scala/akka/dispatch/Future.scala b/akka-actor/src/main/scala/akka/dispatch/Future.scala index 9146a5282f..4ec877b8bb 100644 --- a/akka-actor/src/main/scala/akka/dispatch/Future.scala +++ b/akka-actor/src/main/scala/akka/dispatch/Future.scala @@ -206,27 +206,27 @@ object Futures { /** * (Blocking!) */ - @deprecated("Will be removed after 1.1, if you must block, use: futures.foreach(_.await)") + @deprecated("Will be removed after 1.1, if you must block, use: futures.foreach(_.await)", "1.1") def awaitAll(futures: List[Future[_]]): Unit = futures.foreach(_.await) /** * Returns the First Future that is completed (blocking!) */ - @deprecated("Will be removed after 1.1, if you must block, use: firstCompletedOf(futures).await") + @deprecated("Will be removed after 1.1, if you must block, use: firstCompletedOf(futures).await", "1.1") def awaitOne(futures: List[Future[_]], timeout: Long = Long.MaxValue): Future[_] = firstCompletedOf[Any](futures, timeout).await /** * Applies the supplied function to the specified collection of Futures after awaiting each future to be completed */ - @deprecated("Will be removed after 1.1, if you must block, use: futures map { f => fun(f.await) }") + @deprecated("Will be removed after 1.1, if you must block, use: futures map { f => fun(f.await) }", "1.1") def awaitMap[A,B](in: Traversable[Future[A]])(fun: (Future[A]) => B): Traversable[B] = in map { f => fun(f.await) } /** * Returns Future.resultOrException of the first completed of the 2 Futures provided (blocking!) */ - @deprecated("Will be removed after 1.1, if you must block, use: firstCompletedOf(List(f1,f2)).await.resultOrException") + @deprecated("Will be removed after 1.1, if you must block, use: firstCompletedOf(List(f1,f2)).await.resultOrException", "1.1") def awaitEither[T](f1: Future[T], f2: Future[T]): Option[T] = firstCompletedOf[T](List(f1,f2)).await.resultOrException } @@ -349,7 +349,7 @@ sealed trait Future[+T] { * caution with this method as it ignores the timeout and will block * indefinitely if the Future is never completed. */ - @deprecated("Will be removed after 1.1, it's dangerous and can cause deadlocks, agony and insanity.") + @deprecated("Will be removed after 1.1, it's dangerous and can cause deadlocks, agony and insanity.", "1.1") def awaitBlocking : Future[T] /** diff --git a/akka-actor/src/main/scala/akka/dispatch/ThreadPoolBuilder.scala b/akka-actor/src/main/scala/akka/dispatch/ThreadPoolBuilder.scala index 0bcc0662e0..842a8f86d8 100644 --- a/akka-actor/src/main/scala/akka/dispatch/ThreadPoolBuilder.scala +++ b/akka-actor/src/main/scala/akka/dispatch/ThreadPoolBuilder.scala @@ -89,7 +89,7 @@ case class ThreadPoolConfigDispatcherBuilder(dispatcherFactory: (ThreadPoolConfi def build = dispatcherFactory(config) //TODO remove this, for backwards compat only - @deprecated("Use .build instead") def buildThreadPool = build + @deprecated("Use .build instead", "1.1") def buildThreadPool = build def withNewBoundedThreadPoolWithLinkedBlockingQueueWithUnboundedCapacity(bounds: Int): ThreadPoolConfigDispatcherBuilder = this.copy(config = config.copy(flowHandler = flowHandler(bounds), queueFactory = linkedBlockingQueue())) diff --git a/akka-actor/src/main/scala/akka/remoteinterface/RemoteInterface.scala b/akka-actor/src/main/scala/akka/remoteinterface/RemoteInterface.scala index 9c631576ef..8feb774188 100644 --- a/akka-actor/src/main/scala/akka/remoteinterface/RemoteInterface.scala +++ b/akka-actor/src/main/scala/akka/remoteinterface/RemoteInterface.scala @@ -167,7 +167,7 @@ abstract class RemoteSupport extends ListenerManagement with RemoteServerModule * val actor = actorOf(classOf[MyActor],"www.akka.io", 2552).start() * */ - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") def actorOf(factory: => Actor, host: String, port: Int): ActorRef = Actor.remote.clientManagedActorOf(() => factory, host, port) @@ -186,7 +186,7 @@ abstract class RemoteSupport extends ListenerManagement with RemoteServerModule * val actor = actorOf(classOf[MyActor],"www.akka.io",2552).start() * */ - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") def actorOf(clazz: Class[_ <: Actor], host: String, port: Int): ActorRef = clientManagedActorOf(() => createActorFromClass(clazz), host, port) @@ -205,7 +205,7 @@ abstract class RemoteSupport extends ListenerManagement with RemoteServerModule * val actor = actorOf[MyActor]("www.akka.io",2552).start() * */ - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") def actorOf[T <: Actor : Manifest](host: String, port: Int): ActorRef = clientManagedActorOf(() => createActorFromClass(manifest.erasure), host, port) @@ -447,7 +447,7 @@ trait RemoteClientModule extends RemoteModule { self: RemoteModule => def typedActorFor[T](intfClass: Class[T], serviceId: String, implClassName: String, timeout: Long, hostname: String, port: Int, loader: ClassLoader): T = typedActorFor(intfClass, serviceId, implClassName, timeout, hostname, port, Some(loader)) - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") def clientManagedActorOf(factory: () => Actor, host: String, port: Int): ActorRef @@ -487,9 +487,9 @@ trait RemoteClientModule extends RemoteModule { self: RemoteModule => private[akka] def deregisterSupervisorForActor(actorRef: ActorRef): ActorRef - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") private[akka] def registerClientManagedActor(hostname: String, port: Int, uuid: Uuid): Unit - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") private[akka] def unregisterClientManagedActor(hostname: String, port: Int, uuid: Uuid): Unit } diff --git a/akka-typed-actor/src/main/scala/akka/actor/TypedActor.scala b/akka-typed-actor/src/main/scala/akka/actor/TypedActor.scala index 4cc1892e65..36af9b9784 100644 --- a/akka-typed-actor/src/main/scala/akka/actor/TypedActor.scala +++ b/akka-typed-actor/src/main/scala/akka/actor/TypedActor.scala @@ -412,12 +412,12 @@ object TypedActorConfiguration { new TypedActorConfiguration().timeout(Duration(timeout, "millis")) } - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") def apply(host: String, port: Int) : TypedActorConfiguration = { new TypedActorConfiguration().makeRemote(host, port) } - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") def apply(host: String, port: Int, timeout: Long) : TypedActorConfiguration = { new TypedActorConfiguration().makeRemote(host, port).timeout(Duration(timeout, "millis")) } @@ -447,10 +447,10 @@ final class TypedActorConfiguration { this } - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") def makeRemote(hostname: String, port: Int): TypedActorConfiguration = makeRemote(new InetSocketAddress(hostname, port)) - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") def makeRemote(remoteAddress: InetSocketAddress): TypedActorConfiguration = { _host = Some(remoteAddress) this @@ -518,7 +518,7 @@ object TypedActor { * @param host hostname of the remote server * @param port port of the remote server */ - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") def newRemoteInstance[T](intfClass: Class[T], targetClass: Class[_], hostname: String, port: Int): T = { newInstance(intfClass, targetClass, TypedActorConfiguration(hostname, port)) } @@ -530,7 +530,7 @@ object TypedActor { * @param host hostname of the remote server * @param port port of the remote server */ - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") def newRemoteInstance[T](intfClass: Class[T], factory: => AnyRef, hostname: String, port: Int): T = { newInstance(intfClass, factory, TypedActorConfiguration(hostname, port)) } @@ -563,7 +563,7 @@ object TypedActor { * @param host hostname of the remote server * @param port port of the remote server */ - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") def newRemoteInstance[T](intfClass: Class[T], targetClass: Class[_], timeout: Long, hostname: String, port: Int): T = { newInstance(intfClass, targetClass, TypedActorConfiguration(hostname, port, timeout)) } @@ -576,7 +576,7 @@ object TypedActor { * @param host hostname of the remote server * @param port port of the remote server */ - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") def newRemoteInstance[T](intfClass: Class[T], factory: => AnyRef, timeout: Long, hostname: String, port: Int): T = { newInstance(intfClass, factory, TypedActorConfiguration(hostname, port, timeout)) } @@ -593,7 +593,7 @@ object TypedActor { /** * Creates an ActorRef, can be local only or client-managed-remote */ - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") private[akka] def createActorRef(typedActor: => TypedActor, config: TypedActorConfiguration): ActorRef = { config match { case null => actorOf(typedActor) @@ -669,14 +669,14 @@ object TypedActor { /** * Java API. */ - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") def newRemoteInstance[T](intfClass: Class[T], factory: TypedActorFactory, hostname: String, port: Int) : T = newRemoteInstance(intfClass, factory.create, hostname, port) /** * Java API. */ - @deprecated("Will be removed after 1.1") + @deprecated("Will be removed after 1.1", "1.1") def newRemoteInstance[T](intfClass: Class[T], factory: TypedActorFactory, timeout: Long, hostname: String, port: Int) : T = newRemoteInstance(intfClass, factory.create, timeout, hostname, port)