diff options
author | Vojin Jovanovic <vojin.jovanovic@epfl.ch> | 2013-01-15 17:48:25 +0100 |
---|---|---|
committer | Vojin Jovanovic <vojin.jovanovic@epfl.ch> | 2013-02-07 12:01:19 +0100 |
commit | 8a2cebea5654b5bccbfcf840e935770cf12b5f30 (patch) | |
tree | 053dfd9eb62fdcba90fbfe01213f542e713dd303 /src | |
parent | 5545f35730e54841065cf142597b4e3db3334a1b (diff) | |
download | scala-8a2cebea5654b5bccbfcf840e935770cf12b5f30.tar.gz scala-8a2cebea5654b5bccbfcf840e935770cf12b5f30.tar.bz2 scala-8a2cebea5654b5bccbfcf840e935770cf12b5f30.zip |
SI-6807 Deprecating the Actors library.
All public classes, traits and objects marked as deprecated.
Added deprecation note on the package object.
Embedded external libraries (ThreadPool etc.) are not deprecated as they are intended for internal use only.
Review by: @phaller
Diffstat (limited to 'src')
30 files changed, 38 insertions, 2 deletions
diff --git a/src/actors/scala/actors/AbstractActor.scala b/src/actors/scala/actors/AbstractActor.scala index 5a4e0d9804..3c6299aab4 100644 --- a/src/actors/scala/actors/AbstractActor.scala +++ b/src/actors/scala/actors/AbstractActor.scala @@ -15,6 +15,7 @@ import scala.language.higherKinds * * @define actor actor */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") trait AbstractActor extends OutputChannel[Any] with CanReply[Any, Any] { type Future[+R] <: scala.actors.Future[R] diff --git a/src/actors/scala/actors/Actor.scala b/src/actors/scala/actors/Actor.scala index 61124b3e85..75160fa18f 100644 --- a/src/actors/scala/actors/Actor.scala +++ b/src/actors/scala/actors/Actor.scala @@ -18,6 +18,7 @@ import scala.language.implicitConversions * * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") object Actor extends Combinators { /** State of an actor. @@ -398,6 +399,7 @@ object Actor extends Combinators { * @define channel actor's mailbox */ @SerialVersionUID(-781154067877019505L) +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") trait Actor extends InternalActor with ReplyReactor { override def start(): Actor = synchronized { diff --git a/src/actors/scala/actors/ActorRef.scala b/src/actors/scala/actors/ActorRef.scala index 5c1790669b..0da167aede 100644 --- a/src/actors/scala/actors/ActorRef.scala +++ b/src/actors/scala/actors/ActorRef.scala @@ -45,8 +45,9 @@ trait ActorRef { * This is what is used to complete a Future that is returned from an ask/? call, * when it times out. */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") class AskTimeoutException(message: String, cause: Throwable) extends TimeoutException { def this(message: String) = this(message, null: Throwable) } - +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") object PoisonPill diff --git a/src/actors/scala/actors/CanReply.scala b/src/actors/scala/actors/CanReply.scala index 3d264777a0..3f2c53f423 100644 --- a/src/actors/scala/actors/CanReply.scala +++ b/src/actors/scala/actors/CanReply.scala @@ -17,6 +17,7 @@ import scala.language.higherKinds * * @define actor `CanReply` */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") trait CanReply[-T, +R] { type Future[+P] <: () => P diff --git a/src/actors/scala/actors/Channel.scala b/src/actors/scala/actors/Channel.scala index 9669ffbc17..ddf7b329c8 100644 --- a/src/actors/scala/actors/Channel.scala +++ b/src/actors/scala/actors/Channel.scala @@ -23,6 +23,7 @@ import scala.concurrent.SyncVar * * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") case class ! [a](ch: Channel[a], msg: a) /** @@ -34,6 +35,7 @@ case class ! [a](ch: Channel[a], msg: a) * @define actor channel * @define channel channel */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") class Channel[Msg](val receiver: InternalActor) extends InputChannel[Msg] with OutputChannel[Msg] with CanReply[Msg, Any] { type Future[+P] = scala.actors.Future[P] diff --git a/src/actors/scala/actors/DaemonActor.scala b/src/actors/scala/actors/DaemonActor.scala index ffe8b75c27..04a4b4a40c 100644 --- a/src/actors/scala/actors/DaemonActor.scala +++ b/src/actors/scala/actors/DaemonActor.scala @@ -18,6 +18,7 @@ import scheduler.DaemonScheduler * * @author Erik Engbrecht */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") trait DaemonActor extends Actor { override def scheduler: IScheduler = DaemonScheduler } diff --git a/src/actors/scala/actors/Debug.scala b/src/actors/scala/actors/Debug.scala index cc51dfdbae..31ef53bdbe 100644 --- a/src/actors/scala/actors/Debug.scala +++ b/src/actors/scala/actors/Debug.scala @@ -14,6 +14,7 @@ package scala.actors * * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") object Debug extends Logger("") {} private[actors] class Logger(tag: String) { diff --git a/src/actors/scala/actors/Future.scala b/src/actors/scala/actors/Future.scala index 1abd7b160e..9d123cb2d5 100644 --- a/src/actors/scala/actors/Future.scala +++ b/src/actors/scala/actors/Future.scala @@ -21,6 +21,7 @@ import scala.concurrent.SyncVar * * @author Philipp Haller */ +@deprecated("Use the scala.concurrent.Future instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") abstract class Future[+T] extends Responder[T] with Function0[T] { @volatile @@ -107,6 +108,7 @@ private class FutureActor[T](fun: SyncVar[T] => Unit, channel: Channel[T]) exten * * @author Philipp Haller */ +@deprecated("Use the object scala.concurrent.Future instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") object Futures { /** Arranges for the asynchronous execution of `body`, diff --git a/src/actors/scala/actors/IScheduler.scala b/src/actors/scala/actors/IScheduler.scala index 35c2d32590..9d61d48561 100644 --- a/src/actors/scala/actors/IScheduler.scala +++ b/src/actors/scala/actors/IScheduler.scala @@ -17,6 +17,7 @@ package scala.actors * * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") trait IScheduler { /** Submits a closure for execution. diff --git a/src/actors/scala/actors/InputChannel.scala b/src/actors/scala/actors/InputChannel.scala index 3d7dd7d49b..d2dd6d24df 100644 --- a/src/actors/scala/actors/InputChannel.scala +++ b/src/actors/scala/actors/InputChannel.scala @@ -16,6 +16,7 @@ package scala.actors * * @define channel `InputChannel` */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") trait InputChannel[+Msg] { /** diff --git a/src/actors/scala/actors/InternalActor.scala b/src/actors/scala/actors/InternalActor.scala index ed9e25c1e6..5045ea56e8 100644 --- a/src/actors/scala/actors/InternalActor.scala +++ b/src/actors/scala/actors/InternalActor.scala @@ -524,6 +524,7 @@ private[actors] trait InternalActor extends AbstractActor with InternalReplyReac * * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") case object TIMEOUT /** @@ -534,6 +535,7 @@ case object TIMEOUT * @param from the actor that terminated * @param reason the reason that caused the actor to terminate */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") case class Exit(from: AbstractActor, reason: AnyRef) /** diff --git a/src/actors/scala/actors/InternalReplyReactor.scala b/src/actors/scala/actors/InternalReplyReactor.scala index 38295138d4..c744984fd8 100644 --- a/src/actors/scala/actors/InternalReplyReactor.scala +++ b/src/actors/scala/actors/InternalReplyReactor.scala @@ -12,6 +12,7 @@ import java.util.{TimerTask} * * @define actor `ReplyReactor` */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") trait InternalReplyReactor extends Reactor[Any] with ReactorCanReply { /* A list of the current senders. The head of the list is diff --git a/src/actors/scala/actors/OutputChannel.scala b/src/actors/scala/actors/OutputChannel.scala index fd87f813a0..f0f475e123 100644 --- a/src/actors/scala/actors/OutputChannel.scala +++ b/src/actors/scala/actors/OutputChannel.scala @@ -15,6 +15,7 @@ package scala.actors * * @define actor `OutputChannel` */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") trait OutputChannel[-Msg] { /** diff --git a/src/actors/scala/actors/Reactor.scala b/src/actors/scala/actors/Reactor.scala index f025f6bc29..aa985b3a17 100644 --- a/src/actors/scala/actors/Reactor.scala +++ b/src/actors/scala/actors/Reactor.scala @@ -52,6 +52,7 @@ private[actors] object Reactor { * * @define actor reactor */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") trait Reactor[Msg >: Null] extends OutputChannel[Msg] with Combinators { /* The $actor's mailbox. */ diff --git a/src/actors/scala/actors/ReplyReactor.scala b/src/actors/scala/actors/ReplyReactor.scala index a2051d4354..01e6da000f 100644 --- a/src/actors/scala/actors/ReplyReactor.scala +++ b/src/actors/scala/actors/ReplyReactor.scala @@ -7,7 +7,7 @@ \* */ package scala.actors -@deprecated("Scala Actors are being removed from the standard library. Please refer to the migration guide.", "2.10") +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") trait ReplyReactor extends InternalReplyReactor { protected[actors] def sender: OutputChannel[Any] = super.internalSender } diff --git a/src/actors/scala/actors/Scheduler.scala b/src/actors/scala/actors/Scheduler.scala index dd6c110ed3..5b5b4a946d 100644 --- a/src/actors/scala/actors/Scheduler.scala +++ b/src/actors/scala/actors/Scheduler.scala @@ -18,6 +18,7 @@ import scheduler.{DelegatingScheduler, ForkJoinScheduler, ResizableThreadPoolSch * * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") object Scheduler extends DelegatingScheduler { Debug.info("initializing "+this+"...") diff --git a/src/actors/scala/actors/SchedulerAdapter.scala b/src/actors/scala/actors/SchedulerAdapter.scala index fb28b3f93a..b8e66dd6cc 100644 --- a/src/actors/scala/actors/SchedulerAdapter.scala +++ b/src/actors/scala/actors/SchedulerAdapter.scala @@ -18,6 +18,7 @@ package scala.actors * * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") trait SchedulerAdapter extends IScheduler { /** Submits a <code>Runnable</code> for execution. diff --git a/src/actors/scala/actors/UncaughtException.scala b/src/actors/scala/actors/UncaughtException.scala index f225987ddc..02b916a3b5 100644 --- a/src/actors/scala/actors/UncaughtException.scala +++ b/src/actors/scala/actors/UncaughtException.scala @@ -20,6 +20,7 @@ package scala.actors * @author Philipp Haller * @author Erik Engbrecht */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") case class UncaughtException(actor: InternalActor, message: Option[Any], sender: Option[OutputChannel[Any]], diff --git a/src/actors/scala/actors/package.scala b/src/actors/scala/actors/package.scala index d176487e03..ae960860cf 100644 --- a/src/actors/scala/actors/package.scala +++ b/src/actors/scala/actors/package.scala @@ -14,6 +14,7 @@ package scala * A starting point for using the actors library would be [[scala.actors.Reactor]], * [[scala.actors.ReplyReactor]], or [[scala.actors.Actor]] or their companion objects. * + * @note As of release 2.10.1, replaced by <code>akka.actor</code> package. For migration of existing actors refer to the Actors Migration Guide. */ package object actors { diff --git a/src/actors/scala/actors/remote/JavaSerializer.scala b/src/actors/scala/actors/remote/JavaSerializer.scala index 6e9f4a7c51..7549bbf429 100644 --- a/src/actors/scala/actors/remote/JavaSerializer.scala +++ b/src/actors/scala/actors/remote/JavaSerializer.scala @@ -39,6 +39,7 @@ extends ObjectInputStream(in) { /** * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") class JavaSerializer(serv: Service, cl: ClassLoader) extends Serializer(serv) { def serialize(o: AnyRef): Array[Byte] = { val bos = new ByteArrayOutputStream() diff --git a/src/actors/scala/actors/remote/RemoteActor.scala b/src/actors/scala/actors/remote/RemoteActor.scala index f1644c27ba..799076a01f 100644 --- a/src/actors/scala/actors/remote/RemoteActor.scala +++ b/src/actors/scala/actors/remote/RemoteActor.scala @@ -38,6 +38,7 @@ package remote * * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") object RemoteActor { private val kernels = new scala.collection.mutable.HashMap[InternalActor, NetKernel] @@ -127,4 +128,5 @@ object RemoteActor { * * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") case class Node(address: String, port: Int) diff --git a/src/actors/scala/actors/remote/Serializer.scala b/src/actors/scala/actors/remote/Serializer.scala index e39b01fe24..7be4aa6583 100644 --- a/src/actors/scala/actors/remote/Serializer.scala +++ b/src/actors/scala/actors/remote/Serializer.scala @@ -16,6 +16,7 @@ import java.lang.ClassNotFoundException import java.io.{DataInputStream, DataOutputStream, EOFException, IOException} +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") abstract class Serializer(val service: Service) { def serialize(o: AnyRef): Array[Byte] def deserialize(a: Array[Byte]): AnyRef diff --git a/src/actors/scala/actors/remote/Service.scala b/src/actors/scala/actors/remote/Service.scala index 4584cc308b..d102df1970 100644 --- a/src/actors/scala/actors/remote/Service.scala +++ b/src/actors/scala/actors/remote/Service.scala @@ -14,6 +14,7 @@ package remote * @version 0.9.10 * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") trait Service { val kernel = new NetKernel(this) val serializer: Serializer diff --git a/src/actors/scala/actors/remote/TcpService.scala b/src/actors/scala/actors/remote/TcpService.scala index bde05fd816..8163ae9fc6 100644 --- a/src/actors/scala/actors/remote/TcpService.scala +++ b/src/actors/scala/actors/remote/TcpService.scala @@ -24,6 +24,7 @@ import scala.util.Random * @version 0.9.9 * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") object TcpService { private val random = new Random private val ports = new mutable.HashMap[Int, TcpService] @@ -67,6 +68,7 @@ object TcpService { * @version 0.9.10 * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") class TcpService(port: Int, cl: ClassLoader) extends Thread with Service { val serializer: JavaSerializer = new JavaSerializer(this, cl) diff --git a/src/actors/scala/actors/scheduler/ActorGC.scala b/src/actors/scala/actors/scheduler/ActorGC.scala index 6d9a9458ba..a27799d132 100644 --- a/src/actors/scala/actors/scheduler/ActorGC.scala +++ b/src/actors/scala/actors/scheduler/ActorGC.scala @@ -23,6 +23,7 @@ import scala.collection.mutable * (e.g. act method finishes, exit explicitly called, an exception is thrown), * the ActorGC is informed via the `terminated` method. */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") trait ActorGC extends TerminationMonitor { self: IScheduler => diff --git a/src/actors/scala/actors/scheduler/DaemonScheduler.scala b/src/actors/scala/actors/scheduler/DaemonScheduler.scala index a2d6941ec1..b21a1aa3e6 100644 --- a/src/actors/scala/actors/scheduler/DaemonScheduler.scala +++ b/src/actors/scala/actors/scheduler/DaemonScheduler.scala @@ -14,6 +14,7 @@ package scheduler * * @author Erik Engbrecht */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") object DaemonScheduler extends DelegatingScheduler { protected def makeNewScheduler(): IScheduler = { diff --git a/src/actors/scala/actors/scheduler/ExecutorScheduler.scala b/src/actors/scala/actors/scheduler/ExecutorScheduler.scala index a1d5666a24..4d3ebc3c04 100644 --- a/src/actors/scala/actors/scheduler/ExecutorScheduler.scala +++ b/src/actors/scala/actors/scheduler/ExecutorScheduler.scala @@ -19,6 +19,7 @@ import scala.concurrent.ThreadPoolRunner * * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") object ExecutorScheduler { private def start(sched: ExecutorScheduler): ExecutorScheduler = { @@ -58,6 +59,7 @@ object ExecutorScheduler { * * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") trait ExecutorScheduler extends Thread with IScheduler with TerminationService with ThreadPoolRunner { diff --git a/src/actors/scala/actors/scheduler/ForkJoinScheduler.scala b/src/actors/scala/actors/scheduler/ForkJoinScheduler.scala index ce67ffd037..ac123cfe26 100644 --- a/src/actors/scala/actors/scheduler/ForkJoinScheduler.scala +++ b/src/actors/scala/actors/scheduler/ForkJoinScheduler.scala @@ -9,6 +9,7 @@ import scala.concurrent.forkjoin._ * * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") class ForkJoinScheduler(val initCoreSize: Int, val maxSize: Int, daemon: Boolean, fair: Boolean) extends Runnable with IScheduler with TerminationMonitor { diff --git a/src/actors/scala/actors/scheduler/ResizableThreadPoolScheduler.scala b/src/actors/scala/actors/scheduler/ResizableThreadPoolScheduler.scala index f370d45094..2c4b7677b0 100644 --- a/src/actors/scala/actors/scheduler/ResizableThreadPoolScheduler.scala +++ b/src/actors/scala/actors/scheduler/ResizableThreadPoolScheduler.scala @@ -22,6 +22,7 @@ import scala.concurrent.ManagedBlocker * * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") class ResizableThreadPoolScheduler(protected val terminate: Boolean, protected val daemon: Boolean) extends Thread with IScheduler with TerminationMonitor { diff --git a/src/actors/scala/actors/scheduler/SingleThreadedScheduler.scala b/src/actors/scala/actors/scheduler/SingleThreadedScheduler.scala index 04d1d2c5c1..03b235fe74 100644 --- a/src/actors/scala/actors/scheduler/SingleThreadedScheduler.scala +++ b/src/actors/scala/actors/scheduler/SingleThreadedScheduler.scala @@ -17,6 +17,7 @@ import scala.collection.mutable * * @author Philipp Haller */ +@deprecated("Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.", "2.11.0") class SingleThreadedScheduler extends IScheduler { private val tasks = new mutable.Queue[Runnable] |