Class

colossus.service

LoadBalancingClient

Related Doc: package service

Permalink

class LoadBalancingClient[P <: Protocol] extends WorkerItem with Sender[P, Callback]

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

Annotations
@deprecated
Deprecated

(Since version 0.11.0) Load balancer now built into client

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LoadBalancingClient
  2. Sender
  3. WorkerItem
  4. WorkerItemEvents
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LoadBalancingClient(addresses: Seq[InetSocketAddress], baseConfig: ClientConfig, factory: ClientFactory[P, Callback, Sender[P, Callback], WorkerRef], maxTries: Int)(implicit worker: WorkerRef)

    Permalink
  2. new LoadBalancingClient(worker: WorkerRef, generator: (InetSocketAddress) ⇒ Sender[P, Callback], maxTries: Int = Int.MaxValue, initialClients: Seq[InetSocketAddress] = Nil)

    Permalink

Type Members

  1. case class Client(address: InetSocketAddress, client: Sender[P, Callback]) extends Product with Serializable

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addClient(address: InetSocketAddress): Unit

    Permalink
  5. def addInterceptor(interceptor: Interceptor[P]): Unit

    Permalink
    Definition Classes
    LoadBalancingClientSender
  6. def address(): InetSocketAddress

    Permalink
    Definition Classes
    LoadBalancingClientSender
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val context: Context

    Permalink
    Definition Classes
    LoadBalancingClientWorkerItem
  10. def disconnect(): Unit

    Permalink
    Definition Classes
    LoadBalancingClientSender
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. def id: Long

    Permalink
    Definition Classes
    WorkerItem
  17. def isBound: Boolean

    Permalink
    Definition Classes
    WorkerItem
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def onBind(): Unit

    Permalink

    Called when the item is bound to a worker.

    Called when the item is bound to a worker.

    Attributes
    protected
    Definition Classes
    WorkerItemEvents
  23. def onUnbind(): Unit

    Permalink

    Called when the item has been unbound from a worker

    Called when the item has been unbound from a worker

    Attributes
    protected
    Definition Classes
    WorkerItemEvents
  24. def receivedMessage(message: Any, sender: ActorRef): Unit

    Permalink

    Provides a way to send this WorkerItem a message from an Actor by way of WorkerCommand.Message.

    Provides a way to send this WorkerItem a message from an Actor by way of WorkerCommand.Message.

    message

    The message that was sent

    sender

    The sender who sent the message

    Definition Classes
    LoadBalancingClientWorkerItemEvents
  25. def removeClient(address: InetSocketAddress): Unit

    Permalink
  26. def send(request: P.Request): Callback[P.Response]

    Permalink
    Definition Classes
    LoadBalancingClientSender
  27. def shutdownRequest(): Unit

    Permalink

    A Request has been made to shutdown this WorkerItem.

    A Request has been made to shutdown this WorkerItem. By default this will simply unbind the item from its Worker, but this can be overriden to add in custom shutdown behaviors. Be aware that in some cases this method may not be called and the item will be unbound, such as when an IOSystem is shutting down.

    Definition Classes
    WorkerItem
  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. def update(addresses: Seq[InetSocketAddress]): Unit

    Permalink
    Definition Classes
    LoadBalancingClientSender
  31. def update(addresses: Seq[InetSocketAddress], allowDuplicates: Boolean = false): Unit

    Permalink

    Updates the client list, creating connections for new addresses not in the existing list and closing connections not in the new list

  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def worker: WorkerRef

    Permalink
    Definition Classes
    WorkerItem

Inherited from Sender[P, Callback]

Inherited from WorkerItem

Inherited from WorkerItemEvents

Inherited from AnyRef

Inherited from Any

Ungrouped