Permalink
Browse files

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
  • Loading branch information...
1 parent 5545f35 commit 8a2cebea5654b5bccbfcf840e935770cf12b5f30 @vjovanov vjovanov committed Jan 15, 2013
Showing with 38 additions and 2 deletions.
  1. +1 −0 src/actors/scala/actors/AbstractActor.scala
  2. +2 −0 src/actors/scala/actors/Actor.scala
  3. +2 −1 src/actors/scala/actors/ActorRef.scala
  4. +1 −0 src/actors/scala/actors/CanReply.scala
  5. +2 −0 src/actors/scala/actors/Channel.scala
  6. +1 −0 src/actors/scala/actors/DaemonActor.scala
  7. +1 −0 src/actors/scala/actors/Debug.scala
  8. +2 −0 src/actors/scala/actors/Future.scala
  9. +1 −0 src/actors/scala/actors/IScheduler.scala
  10. +1 −0 src/actors/scala/actors/InputChannel.scala
  11. +2 −0 src/actors/scala/actors/InternalActor.scala
  12. +1 −0 src/actors/scala/actors/InternalReplyReactor.scala
  13. +1 −0 src/actors/scala/actors/OutputChannel.scala
  14. +1 −0 src/actors/scala/actors/Reactor.scala
  15. +1 −1 src/actors/scala/actors/ReplyReactor.scala
  16. +1 −0 src/actors/scala/actors/Scheduler.scala
  17. +1 −0 src/actors/scala/actors/SchedulerAdapter.scala
  18. +1 −0 src/actors/scala/actors/UncaughtException.scala
  19. +1 −0 src/actors/scala/actors/package.scala
  20. +1 −0 src/actors/scala/actors/remote/JavaSerializer.scala
  21. +2 −0 src/actors/scala/actors/remote/RemoteActor.scala
  22. +1 −0 src/actors/scala/actors/remote/Serializer.scala
  23. +1 −0 src/actors/scala/actors/remote/Service.scala
  24. +2 −0 src/actors/scala/actors/remote/TcpService.scala
  25. +1 −0 src/actors/scala/actors/scheduler/ActorGC.scala
  26. +1 −0 src/actors/scala/actors/scheduler/DaemonScheduler.scala
  27. +2 −0 src/actors/scala/actors/scheduler/ExecutorScheduler.scala
  28. +1 −0 src/actors/scala/actors/scheduler/ForkJoinScheduler.scala
  29. +1 −0 src/actors/scala/actors/scheduler/ResizableThreadPoolScheduler.scala
  30. +1 −0 src/actors/scala/actors/scheduler/SingleThreadedScheduler.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]
@@ -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 {
@@ -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
@@ -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
@@ -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]
@@ -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
}
@@ -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) {
@@ -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`,
@@ -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.
@@ -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] {
/**
@@ -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)
/**
@@ -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
@@ -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] {
/**
@@ -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. */
@@ -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
}
@@ -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+"...")
@@ -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.
@@ -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]],
@@ -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 {
@@ -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()
@@ -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)
@@ -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
@@ -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
@@ -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)
@@ -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 =>
@@ -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 = {
@@ -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 {
@@ -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 {
@@ -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 {
@@ -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]

0 comments on commit 8a2cebe

Please sign in to comment.