Class

colossus.service

LoadBalancingClient

Related Doc: package service

Permalink

class LoadBalancingClient[I, O] extends ServiceClientLike[I, O] with WorkerItem

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

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

Instance Constructors

  1. new LoadBalancingClient(worker: WorkerRef, generator: (InetSocketAddress) ⇒ ServiceClient[I, O], maxTries: Int = Int.MaxValue, initialClients: Seq[InetSocketAddress] = Nil)

    Permalink

Type Members

  1. case class Send(request: I, promise: Promise[O]) 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): ServiceClient[I, O]

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def binding: Option[WorkerItemBinding]

    Permalink

    When bound to a worker, this contains the [WorkerItemBinding]

    When bound to a worker, this contains the [WorkerItemBinding]

    Definition Classes
    WorkerItem
  7. def boundWorker: Option[WorkerRef]

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def currentClients: List[ServiceClient[I, O]]

    Permalink
  10. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. def gracefulDisconnect(): Unit

    Permalink
    Definition Classes
    LoadBalancingClientServiceClientLike
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. def id: Option[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
    WorkerItem
  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
    WorkerItem
  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
    LoadBalancingClientWorkerItem
  25. def removeClient(address: InetSocketAddress): Unit

    Permalink
  26. def removeClient(client: ServiceClient[I, O]): Unit

    Permalink
  27. def send(request: I): Callback[O]

    Permalink
    Definition Classes
    LoadBalancingClientServiceClientLike
  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

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

  31. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from WorkerItem

Inherited from ServiceClientLike[I, O]

Inherited from AnyRef

Inherited from Any

Ungrouped