Fixed misc FIXMEs
This commit is contained in:
parent
7b485f659b
commit
e9dfaf7ed8
4 changed files with 7 additions and 9 deletions
|
|
@ -119,8 +119,9 @@ case class UnhandledMessageException(msg: Any, ref: ActorRef = null) extends Exc
|
|||
|
||||
/**
|
||||
* Classes for passing status back to the sender.
|
||||
* Used for internal ACKing protocol. But exposed as utility class for user-specific ACKing protocols as well.
|
||||
*/
|
||||
object Status { //FIXME Why does this exist at all?
|
||||
object Status {
|
||||
sealed trait Status extends Serializable
|
||||
case class Success(status: AnyRef) extends Status
|
||||
case class Failure(cause: Throwable) extends Status
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import java.net.InetSocketAddress
|
|||
/**
|
||||
* An Iterable that also contains a version.
|
||||
*/
|
||||
// FIXME REMOVE VersionedIterable
|
||||
trait VersionedIterable[A] {
|
||||
val version: Long
|
||||
|
||||
|
|
|
|||
|
|
@ -59,8 +59,6 @@ object RouterType {
|
|||
|
||||
/**
|
||||
* A RouterType that select the connection based on the least amount of ram used.
|
||||
*
|
||||
* FIXME: this is extremely vague currently since there are so many ways to define least amount of ram.
|
||||
*/
|
||||
object LeastRAM extends RouterType
|
||||
|
||||
|
|
|
|||
|
|
@ -142,8 +142,6 @@ private[akka] class RoutedActorRef(val routedProps: RoutedProps, override val ad
|
|||
/**
|
||||
* An Abstract Router implementation that already provides the basic infrastructure so that a concrete
|
||||
* Router only needs to implement the next method.
|
||||
*
|
||||
* FIXME: this is also the location where message buffering should be done in case of failure.
|
||||
*/
|
||||
trait BasicRouter extends Router {
|
||||
|
||||
|
|
@ -258,15 +256,17 @@ class DirectRouter extends BasicRouter {
|
|||
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
||||
*/
|
||||
class RandomRouter extends BasicRouter {
|
||||
import java.security.SecureRandom
|
||||
|
||||
private val state = new AtomicReference[RandomRouterState]
|
||||
|
||||
//FIXME: threadlocal random?
|
||||
private val random = new java.util.Random(System.nanoTime)
|
||||
private val random = new ThreadLocal[SecureRandom] {
|
||||
override def initialValue = SecureRandom.getInstance("SHA1PRNG")
|
||||
}
|
||||
|
||||
def next: Option[ActorRef] = currentState.array match {
|
||||
case a if a.isEmpty ⇒ None
|
||||
case a ⇒ Some(a(random.nextInt(a.length)))
|
||||
case a ⇒ Some(a(random.get.nextInt(a.length)))
|
||||
}
|
||||
|
||||
@tailrec
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue