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

TODO: does this need to actually be a WorkerItem anymore?

Linear Supertypes
Sender[P, Callback], WorkerItem, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LoadBalancingClient
  2. Sender
  3. WorkerItem
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. 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. final def asInstanceOf[T0]: T0

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

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

    Permalink
    Definition Classes
    WorkerItem
  8. def disconnect(): Unit

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

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

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

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

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

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

    Permalink
    Definition Classes
    WorkerItem
  15. def isBound: Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  20. 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
    WorkerItem
  21. 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
    WorkerItem
  22. 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
    LoadBalancingClientWorkerItem
  23. def removeClient(address: InetSocketAddress): Unit

    Permalink
  24. def send(request: P.Input): Callback[P.Output]

    Permalink
    Definition Classes
    LoadBalancingClientSender
  25. 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
  26. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  28. 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

  29. final def wait(): Unit

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

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

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

    Permalink
    Definition Classes
    WorkerItem

Inherited from Sender[P, Callback]

Inherited from WorkerItem

Inherited from AnyRef

Inherited from Any

Ungrouped