Skip to content

Commit

Permalink
Adding deprecations for 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorklang committed May 25, 2012
1 parent 5dfbb8e commit bbb2cc0
Show file tree
Hide file tree
Showing 22 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions akka-actor/src/main/java/akka/jsr166y/ForkJoinPool.java
Expand Up @@ -123,6 +123,7 @@
* @since 1.7
* @author Doug Lea
*/
@Deprecated
public class ForkJoinPool extends AbstractExecutorService {

/*
Expand Down
1 change: 1 addition & 0 deletions akka-actor/src/main/java/com/eaio/uuid/UUID.java
Expand Up @@ -52,6 +52,7 @@
* @author <a href="mailto:jb@eaio.de">Johann Burkard</a>
* @version $Id: UUID.java 1888 2009-03-15 12:43:24Z johann $
*/
@Deprecated
public class UUID implements Comparable<UUID>, Serializable, Cloneable {

/**
Expand Down
7 changes: 7 additions & 0 deletions akka-actor/src/main/scala/akka/actor/Actor.scala
Expand Up @@ -13,6 +13,7 @@ import java.util.regex.Pattern
/**
* Marker trait to show which Messages are automatically handled by Akka
*/
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
trait AutoReceivedMessage extends Serializable

/**
Expand All @@ -26,6 +27,7 @@ trait PossiblyHarmful
*/
trait NoSerializationVerificationNeeded

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class Failed(cause: Throwable) extends AutoReceivedMessage with PossiblyHarmful

abstract class PoisonPill extends AutoReceivedMessage with PossiblyHarmful
Expand Down Expand Up @@ -59,9 +61,13 @@ case object ReceiveTimeout extends ReceiveTimeout {
* nested path descriptions whenever using ! on them, the idea being that the
* message is delivered by active routing of the various actors involved.
*/
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
sealed trait SelectionPath extends AutoReceivedMessage
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class SelectChildName(name: String, next: Any) extends SelectionPath
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class SelectChildPattern(pattern: Pattern, next: Any) extends SelectionPath
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class SelectParent(next: Any) extends SelectionPath

// Exceptions for Actors
Expand All @@ -84,6 +90,7 @@ case class ActorInitializationException private[akka] (actor: ActorRef, message:
def this(msg: String) = this(null, msg, null);
}

@deprecated("Will be superceded by akka.pattern.AskTimeoutException", "2.0.2")
class ActorTimeoutException private[akka] (message: String, cause: Throwable = null)
extends AkkaException(message, cause) {
def this(msg: String) = this(msg, null);
Expand Down
3 changes: 3 additions & 0 deletions akka-actor/src/main/scala/akka/actor/ActorRef.scala
Expand Up @@ -160,10 +160,12 @@ trait ScalaActorRef { ref: ActorRef ⇒
* often necessary to distinguish between local and non-local references, this
* is the only method provided on the scope.
*/
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
trait ActorRefScope {
def isLocal: Boolean
}

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
trait LocalRef extends ActorRefScope {
final def isLocal = true
}
Expand Down Expand Up @@ -335,6 +337,7 @@ private[akka] class LocalActorRef private[akka] (
* Memento pattern for serializing ActorRefs transparently
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class SerializedActorRef private (path: String) {
import akka.serialization.JavaSerializer.currentSystem

Expand Down
1 change: 1 addition & 0 deletions akka-actor/src/main/scala/akka/actor/ActorSystem.scala
Expand Up @@ -416,6 +416,7 @@ abstract class ExtendedActorSystem extends ActorSystem {
def dynamicAccess: DynamicAccess
}

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class ActorSystemImpl protected[akka] (val name: String, applicationConfig: Config, classLoader: ClassLoader) extends ExtendedActorSystem {

if (!name.matches("""^[a-zA-Z0-9][a-zA-Z0-9-]*$"""))
Expand Down
3 changes: 3 additions & 0 deletions akka-actor/src/main/scala/akka/actor/FSM.scala
Expand Up @@ -27,8 +27,11 @@ object FSM {
case class Failure(cause: Any) extends Reason

case object StateTimeout

@deprecated("Will become private in 2.1, this is not user-api", "2.0.2")
case class TimeoutMarker(generation: Long)

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class Timer(name: String, msg: Any, repeat: Boolean, generation: Int)(implicit system: ActorSystem) {
private var ref: Option[Cancellable] = _

Expand Down
1 change: 1 addition & 0 deletions akka-actor/src/main/scala/akka/actor/FaultHandling.scala
Expand Up @@ -173,6 +173,7 @@ object SupervisorStrategy extends SupervisorStrategyLowPriorityImplicits {
* Sort so that subtypes always precede their supertypes, but without
* obeying any order between unrelated subtypes (insert sort).
*/
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
def sort(in: Iterable[CauseDirective]): Seq[CauseDirective] =
(new ArrayBuffer[CauseDirective](in.size) /: in) { (buf, ca)
buf.indexWhere(_._1 isAssignableFrom ca._1) match {
Expand Down
1 change: 1 addition & 0 deletions akka-actor/src/main/scala/akka/actor/Scheduler.scala
Expand Up @@ -244,6 +244,7 @@ private[akka] class ContinuousCancellable extends Cancellable {
}
}

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class DefaultCancellable(val timeout: HWTimeout) extends Cancellable {
def cancel() {
timeout.cancel()
Expand Down
1 change: 1 addition & 0 deletions akka-actor/src/main/scala/akka/actor/TypedActor.scala
Expand Up @@ -144,6 +144,7 @@ object TypedActor extends ExtensionId[TypedActorExtension] with ExtensionIdProvi
/**
* Represents the serialized form of a MethodCall, uses readResolve and writeReplace to marshall the call
*/
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class SerializedMethodCall(ownerType: Class[_], methodName: String, parameterTypes: Array[Class[_]], serializedParameters: Array[(Int, Class[_], Array[Byte])]) {

//TODO implement writeObject and readObject to serialize
Expand Down
Expand Up @@ -6,10 +6,12 @@ package akka.config

import akka.AkkaException

@deprecated("Will be moved to akka.ConfigurationException in Akka 2.1", "2.0.2")
class ConfigurationException(message: String, cause: Throwable = null) extends AkkaException(message, cause) {
def this(msg: String) = this(msg, null);
}

@deprecated("Will be removed in Akka 2.1, no replacement", "2.0.2")
class ModuleNotAvailableException(message: String, cause: Throwable = null) extends AkkaException(message, cause) {
def this(msg: String) = this(msg, null);
}
11 changes: 11 additions & 0 deletions akka-actor/src/main/scala/akka/dispatch/AbstractDispatcher.scala
Expand Up @@ -35,6 +35,7 @@ final case class Envelope(val message: Any, val sender: ActorRef)(system: ActorS
}
}

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
object SystemMessage {
@tailrec
final def size(list: SystemMessage, acc: Int = 0): Int = {
Expand Down Expand Up @@ -63,18 +64,28 @@ object SystemMessage {
*
* ➡➡➡ NEVER SEND THE SAME SYSTEM MESSAGE OBJECT TO TWO ACTORS ⬅⬅⬅
*/
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
sealed trait SystemMessage extends PossiblyHarmful {
@transient
var next: SystemMessage = _
}
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class Create() extends SystemMessage // send to self from Dispatcher.register
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class Recreate(cause: Throwable) extends SystemMessage // sent to self from ActorCell.restart
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class Suspend() extends SystemMessage // sent to self from ActorCell.suspend
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class Resume() extends SystemMessage // sent to self from ActorCell.resume
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class Terminate() extends SystemMessage // sent to self from ActorCell.stop
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class Supervise(child: ActorRef) extends SystemMessage // sent to supervisor ActorRef from ActorCell.start
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class ChildTerminated(child: ActorRef) extends SystemMessage // sent to supervisor from ActorCell.doTerminate
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class Link(subject: ActorRef) extends SystemMessage // sent to self from ActorCell.watch
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class Unlink(subject: ActorRef) extends SystemMessage // sent to self from ActorCell.unwatch

final case class TaskInvocation(eventStream: EventStream, runnable: Runnable, cleanup: () Unit) extends Runnable {
Expand Down
Expand Up @@ -35,6 +35,7 @@ class BalancingDispatcher(
attemptTeamWork: Boolean)
extends Dispatcher(_prerequisites, _id, throughput, throughputDeadlineTime, mailboxType, _executorServiceFactoryProvider, _shutdownTimeout) {

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
val team = new ConcurrentSkipListSet[ActorCell](
Helpers.identityHashComparator(new Comparator[ActorCell] {
def compare(l: ActorCell, r: ActorCell) = l.self.path compareTo r.self.path
Expand Down Expand Up @@ -75,6 +76,7 @@ class BalancingDispatcher(
}
}

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class SharingMailbox(_actor: ActorCell, _messageQueue: MessageQueue)
extends Mailbox(_actor, _messageQueue) with DefaultSystemMessageQueue {

Expand Down
1 change: 1 addition & 0 deletions akka-actor/src/main/scala/akka/dispatch/Dispatchers.scala
Expand Up @@ -25,6 +25,7 @@ trait DispatcherPrerequisites {
def settings: ActorSystem.Settings
}

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
case class DefaultDispatcherPrerequisites(
val threadFactory: ThreadFactory,
val eventStream: EventStream,
Expand Down
1 change: 1 addition & 0 deletions akka-actor/src/main/scala/akka/dispatch/Mailbox.scala
Expand Up @@ -16,6 +16,7 @@ import akka.actor.ActorSystem

class MessageQueueAppendFailedException(message: String, cause: Throwable = null) extends AkkaException(message, cause)

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
object Mailbox {

type Status = Int
Expand Down
2 changes: 2 additions & 0 deletions akka-actor/src/main/scala/akka/event/Logging.scala
Expand Up @@ -348,8 +348,10 @@ object LogSource {
*/
object Logging {

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
object Extension extends ExtensionKey[LogExt]

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class LogExt(system: ExtendedActorSystem) extends Extension {
private val loggerId = new AtomicInteger
def id() = loggerId.incrementAndGet()
Expand Down
2 changes: 2 additions & 0 deletions akka-agent/src/main/scala/akka/agent/Agent.scala
Expand Up @@ -282,6 +282,7 @@ class Agent[T](initialValue: T, system: ActorSystem) {
/**
* Agent updater actor. Used internally for `send` actions.
*/
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class AgentUpdater[T](agent: Agent[T]) extends Actor {
def receive = {
case u: Update[_] update(u.function.asInstanceOf[T T])
Expand All @@ -296,6 +297,7 @@ class AgentUpdater[T](agent: Agent[T]) extends Actor {
/**
* Thread-based agent updater actor. Used internally for `sendOff` actions.
*/
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class ThreadBasedAgentUpdater[T](agent: Agent[T]) extends Actor {
def receive = {
case u: Update[_] try {
Expand Down
Expand Up @@ -9,6 +9,7 @@ import com.google.protobuf.ByteString
import akka.actor.ExtendedActorSystem
import akka.serialization.SerializationExtension

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
object MessageSerializer {

def deserialize(system: ExtendedActorSystem, messageProtocol: MessageProtocol): AnyRef = {
Expand Down
Expand Up @@ -22,6 +22,7 @@ class RemoteConnectionException(msg: String) extends RemoteException(msg)
/**
* Remote ActorRefProvider. Starts up actor on remote node and creates a RemoteActorRef representing it.
*/
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class RemoteActorRefProvider(
val systemName: String,
val settings: ActorSystem.Settings,
Expand Down Expand Up @@ -212,6 +213,7 @@ class RemoteActorRefProvider(
}
}

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
trait RemoteRef extends ActorRefScope {
final def isLocal = false
}
Expand Down Expand Up @@ -257,6 +259,7 @@ private[akka] class RemoteActorRef private[akka] (
private def writeReplace(): AnyRef = SerializedActorRef(path)
}

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class RemoteDeathWatch(val local: LocalDeathWatch, val provider: RemoteActorRefProvider) extends DeathWatch {

def subscribe(watcher: ActorRef, watched: ActorRef): Boolean = watched match {
Expand Down
4 changes: 4 additions & 0 deletions akka-remote/src/main/scala/akka/remote/netty/Client.scala
Expand Up @@ -34,6 +34,7 @@ class RemoteClientMessageBufferException(message: String, cause: Throwable) exte
* ActiveRemoteClient, but others could be feasible, like a PassiveRemoteClient that
* reuses an already established connection.
*/
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
abstract class RemoteClient private[akka] (
val netty: NettyRemoteTransport,
val remoteAddress: Address) {
Expand Down Expand Up @@ -97,6 +98,7 @@ abstract class RemoteClient private[akka] (
/**
* RemoteClient represents a connection to an Akka node. Is used to send messages to remote actors on the node.
*/
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class ActiveRemoteClient private[akka] (
netty: NettyRemoteTransport,
remoteAddress: Address,
Expand Down Expand Up @@ -230,6 +232,7 @@ class ActiveRemoteClient private[akka] (
}

@ChannelHandler.Sharable
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class ActiveRemoteClientHandler(
val name: String,
val bootstrap: ClientBootstrap,
Expand Down Expand Up @@ -344,6 +347,7 @@ class ActiveRemoteClientPipelineFactory(
}
}

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class PassiveRemoteClient(val currentChannel: Channel,
netty: NettyRemoteTransport,
remoteAddress: Address)
Expand Down
Expand Up @@ -26,6 +26,7 @@ import akka.util.NonFatal
/**
* Provides the implementation of the Netty remote support
*/
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class NettyRemoteTransport(val remoteSettings: RemoteSettings, val system: ActorSystemImpl, val provider: RemoteActorRefProvider)
extends RemoteTransport with RemoteMarshallingOps {

Expand Down Expand Up @@ -191,6 +192,7 @@ class NettyRemoteTransport(val remoteSettings: RemoteSettings, val system: Actor

}

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class RemoteMessageEncoder(remoteSupport: NettyRemoteTransport) extends ProtobufEncoder {
override def encode(ctx: ChannelHandlerContext, channel: Channel, msg: AnyRef): AnyRef = {
msg match {
Expand All @@ -206,8 +208,10 @@ class RemoteMessageEncoder(remoteSupport: NettyRemoteTransport) extends Protobuf
}
}

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class RemoteMessageDecoder extends ProtobufDecoder(AkkaRemoteProtocol.getDefaultInstance)

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class DefaultDisposableChannelGroup(name: String) extends DefaultChannelGroup(name) {
protected val guard = new ReentrantReadWriteLock
protected val open = new AtomicBoolean(true)
Expand Down
4 changes: 4 additions & 0 deletions akka-remote/src/main/scala/akka/remote/netty/Server.scala
Expand Up @@ -20,6 +20,7 @@ import java.net.InetAddress
import akka.actor.ActorSystemImpl
import org.jboss.netty.channel._

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class NettyRemoteServer(val netty: NettyRemoteTransport) {

import netty.settings
Expand Down Expand Up @@ -98,6 +99,7 @@ class RemoteServerPipelineFactory(
}

@ChannelHandler.Sharable
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class RemoteServerAuthenticationHandler(secureCookie: Option[String]) extends SimpleChannelUpstreamHandler {
val authenticated = new AnyRef

Expand All @@ -124,11 +126,13 @@ class RemoteServerAuthenticationHandler(secureCookie: Option[String]) extends Si
}
}

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
object ChannelLocalSystem extends ChannelLocal[ActorSystemImpl] {
override def initialValue(ch: Channel): ActorSystemImpl = null
}

@ChannelHandler.Sharable
@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class RemoteServerHandler(
val openChannels: ChannelGroup,
val netty: NettyRemoteTransport) extends SimpleChannelUpstreamHandler {
Expand Down
Expand Up @@ -9,6 +9,7 @@ import java.util.concurrent.TimeUnit._
import java.net.InetAddress
import akka.config.ConfigurationException

@deprecated("Will become private[akka] in 2.1, this is not user-api", "2.0.2")
class NettySettings(config: Config, val systemName: String) {

import config._
Expand Down

0 comments on commit bbb2cc0

Please sign in to comment.