Instance Constructors
-
new
LoadBalancingClient(worker: WorkerRef, generator: (InetSocketAddress) ⇒ ServiceClient[I, O], maxTries: Int = Int.MaxValue, initialClients: Seq[InetSocketAddress] = Nil)
Type Members
-
case class
Send(request: I, promise: Promise[O]) extends Product with Serializable
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
def
addClient(address: InetSocketAddress): ServiceClient[I, O]
-
final
def
asInstanceOf[T0]: T0
-
-
def
boundWorker: Option[WorkerRef]
-
def
clone(): AnyRef
-
def
currentClients: List[ServiceClient[I, O]]
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
gracefulDisconnect(): Unit
-
def
hashCode(): Int
-
def
id: Option[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
removeClient(client: ServiceClient[I, O]): Unit
-
def
send(request: I): Callback[O]
-
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