From 4afd41f9c3d548bcf9f3fb338e897799f8eb9ebf Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Thu, 13 Sep 2012 18:07:55 +0200 Subject: [PATCH] #2489 - Remove ConnectionManager --- .../akka/routing/ConnectionManager.scala | 61 ------------------- 1 file changed, 61 deletions(-) delete mode 100644 akka-actor/src/main/scala/akka/routing/ConnectionManager.scala diff --git a/akka-actor/src/main/scala/akka/routing/ConnectionManager.scala b/akka-actor/src/main/scala/akka/routing/ConnectionManager.scala deleted file mode 100644 index 9029c1f78b..0000000000 --- a/akka-actor/src/main/scala/akka/routing/ConnectionManager.scala +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (C) 2009-2012 Typesafe Inc. - */ - -package akka.routing - -import akka.actor._ - -/** - * An Iterable that also contains a version. - */ -trait VersionedIterable[A] { - def version: Long - def iterable: Iterable[A] - def apply(): Iterable[A] = iterable -} - -/** - * Manages connections (ActorRefs) for a router. - */ -trait ConnectionManager { - /** - * A version that is useful to see if there is any change in the connections. If there is a change, a router is - * able to update its internal datastructures. - */ - def version: Long - - /** - * Returns the number of 'available' connections. Value could be stale as soon as received, and this method can't be combined (easily) - * with an atomic read of and size and version. - */ - def size: Int - - /** - * Returns if the number of 'available' is 0 or not. Value could be stale as soon as received, and this method can't be combined (easily) - * with an atomic read of and isEmpty and version. - */ - def isEmpty: Boolean - - /** - * Shuts the connection manager down, which stops all managed actors - */ - def shutdown(): Unit - - /** - * Returns a VersionedIterator containing all connected ActorRefs at some moment in time. Since there is - * the time element, also the version is included to be able to read the data (the connections) and the version - * in an atomic manner. - * - * This Iterable is 'persistent'. So it can be handed out to different threads and they see a stable (immutable) - * view of some set of connections. - */ - def connections: VersionedIterable[ActorRef] - - /** - * Removes a connection from the connection manager. - * - * @param ref the dead - */ - def remove(deadRef: ActorRef): Unit -}