Instance Constructors
-
new
LoadBalancingClient(worker: WorkerRef, generator: (InetSocketAddress) ⇒ Sender[P, Callback], maxTries: Int = Int.MaxValue, initialClients: Seq[InetSocketAddress] = Nil)
Type Members
-
-
case class
Send(request: P.Input, promise: Promise[P.Output]) extends Product with Serializable
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
def
addClient(address: InetSocketAddress): Sender[P, Callback]
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
def
currentClients: List[(InetSocketAddress, Sender[P, Callback])]
-
def
disconnect(): Unit
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
def
id: Long
-
def
isBound: Boolean
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
onBind(): Unit
-
def
onUnbind(): Unit
-
def
receivedMessage(message: Any, sender: ActorRef): Unit
-
def
removeClient(address: InetSocketAddress): Unit
-
def
send(request: P.Input): Callback[P.Output]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
def
update(addresses: Seq[InetSocketAddress]): Unit
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
Inherited from AnyRef
Inherited from Any
The LoadBalancingClient will evenly distribute requests across a set of clients. If one client begins failing, the balancer will retry up to numRetries times across the other clients (with each failover hitting different clients to avoid a cascading pileup
Note that the balancer will never try the same client twice for a request, so setting maxTries to a very large number will mean that every client will be tried once
TODO: does this need to actually be a WorkerItem anymore?