com.twitter.finagle.client

DefaultClient

case class DefaultClient[Req, Rep](name: String, endpointer: (SocketAddress, StatsReceiver) ⇒ ServiceFactory[Req, Rep], pool: (StatsReceiver) ⇒ (ServiceFactory[Req, Rep]) ⇒ ServiceFactory[Req, Rep], maxIdletime: Duration, maxLifetime: Duration, requestTimeout: Duration, failFast: Boolean, failureAccrual: (ServiceFactory[Req, Rep]) ⇒ ServiceFactory[Req, Rep], serviceTimeout: Duration, timer: Timer, statsReceiver: StatsReceiver, hostStatsReceiver: StatsReceiver, tracer: Tracer, monitor: Monitor, reporter: ReporterFactory) extends Client[Req, Rep] with Product with Serializable

A default client implementation that does load balancing and connection pooling. The only required argument is a binder, responsible for binding concrete endpoints (named by SocketAddresses).

name

A name identifying the client.

endpointer

A function used to create a ServiceFactory to a concrete endpoint.

pool

The pool used to cache idle service (connection).

maxIdletime

The maximum time for which any Service is permitted to be idle.

maxLifetime

The maximum lifetime for any Service

requestTimeout

The maximum time that any request is allowed to take.

failFast

When enabled, installs a fail-fast module. See com.twitter.finagle.service.FailFastFactory

failureAccrual

A failure accruing mechanism. Used to gauge the health of the ServiceFactory. By default this uses com.twitter.finagle.client.DefaultClient.defaultFailureAccrual

serviceTimeout

The maximum amount of time allowed for acquiring a service. Defaults to infinity.

Linear Supertypes
Serializable, Serializable, Product, Equals, Client[Req, Rep], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. DefaultClient
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Client
  7. AnyRef
  8. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DefaultClient(name: String, endpointer: (SocketAddress, StatsReceiver) ⇒ ServiceFactory[Req, Rep], pool: (StatsReceiver) ⇒ (ServiceFactory[Req, Rep]) ⇒ ServiceFactory[Req, Rep] = ..., maxIdletime: Duration = com.twitter.util.Duration.Top, maxLifetime: Duration = com.twitter.util.Duration.Top, requestTimeout: Duration = com.twitter.util.Duration.Top, failFast: Boolean = true, failureAccrual: (ServiceFactory[Req, Rep]) ⇒ ServiceFactory[Req, Rep] = ..., serviceTimeout: Duration = com.twitter.util.Duration.Top, timer: Timer = ..., statsReceiver: StatsReceiver = ..., hostStatsReceiver: StatsReceiver = ..., tracer: Tracer = ..., monitor: Monitor = ..., reporter: ReporterFactory = ...)

    name

    A name identifying the client.

    endpointer

    A function used to create a ServiceFactory to a concrete endpoint.

    pool

    The pool used to cache idle service (connection).

    maxIdletime

    The maximum time for which any Service is permitted to be idle.

    maxLifetime

    The maximum lifetime for any Service

    requestTimeout

    The maximum time that any request is allowed to take.

    failFast

    When enabled, installs a fail-fast module. See com.twitter.finagle.service.FailFastFactory

    failureAccrual

    A failure accruing mechanism. Used to gauge the health of the ServiceFactory. By default this uses com.twitter.finagle.client.DefaultClient.defaultFailureAccrual

    serviceTimeout

    The maximum amount of time allowed for acquiring a service. Defaults to infinity.

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val bindStack: (SocketAddress) ⇒ ServiceFactory[Req, Rep]

    Bind a socket address to a well-formed stack

  8. def canEqual(arg0: Any): Boolean

    Definition Classes
    DefaultClient → Equals
  9. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  10. val endpointer: (SocketAddress, StatsReceiver) ⇒ ServiceFactory[Req, Rep]

    A function used to create a ServiceFactory to a concrete endpoint.

  11. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    DefaultClient → Equals → AnyRef → Any
  13. val failFast: Boolean

    When enabled, installs a fail-fast module.

    When enabled, installs a fail-fast module. See com.twitter.finagle.service.FailFastFactory

  14. val failureAccrual: (ServiceFactory[Req, Rep]) ⇒ ServiceFactory[Req, Rep]

    A failure accruing mechanism.

    A failure accruing mechanism. Used to gauge the health of the ServiceFactory. By default this uses com.twitter.finagle.client.DefaultClient.defaultFailureAccrual

  15. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  17. val globalStatsReceiver: RollupStatsReceiver

  18. def hashCode(): Int

    Definition Classes
    DefaultClient → AnyRef → Any
  19. val hostStatsReceiver: StatsReceiver

  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. val maxIdletime: Duration

    The maximum time for which any Service is permitted to be idle.

  22. val maxLifetime: Duration

    The maximum lifetime for any Service

  23. val monitor: Monitor

  24. val name: String

    A name identifying the client.

  25. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. def newClient(group: Group[SocketAddress]): ServiceFactory[Req, Rep]

    Create a new client, a ServiceFactory that is connected to group.

    Create a new client, a ServiceFactory that is connected to group.

    Definition Classes
    DefaultClientClient
  27. final def newClient(target: String): ServiceFactory[Req, Rep]

    Create a new client, a ServiceFactory that is connected to the group resolved by target.

    Create a new client, a ServiceFactory that is connected to the group resolved by target.

    Definition Classes
    Client
  28. final def newService(target: String): Service[Req, Rep]

    Create a new servie connected to target.

    Create a new servie connected to target.

    Definition Classes
    Client
  29. final def newService(group: Group[SocketAddress]): Service[Req, Rep]

    Create a new Service connected to group.

    Create a new Service connected to group.

    Definition Classes
    Client
  30. val newStack: (Group[SocketAddress]) ⇒ ServiceFactory[Req, Rep]

  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. val pool: (StatsReceiver) ⇒ (ServiceFactory[Req, Rep]) ⇒ ServiceFactory[Req, Rep]

    The pool used to cache idle service (connection).

  34. def productArity: Int

    Definition Classes
    DefaultClient → Product
  35. def productElement(arg0: Int): Any

    Definition Classes
    DefaultClient → Product
  36. def productIterator: Iterator[Any]

    Definition Classes
    Product
  37. def productPrefix: String

    Definition Classes
    DefaultClient → Product
  38. val reporter: ReporterFactory

  39. val requestTimeout: Duration

    The maximum time that any request is allowed to take.

  40. val serviceTimeout: Duration

    The maximum amount of time allowed for acquiring a service.

    The maximum amount of time allowed for acquiring a service. Defaults to infinity.

  41. val statsReceiver: StatsReceiver

  42. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  43. val timer: Timer

  44. def toString(): String

    Definition Classes
    DefaultClient → AnyRef → Any
  45. val tracer: Tracer

  46. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Deprecated Value Members

  1. def productElements: Iterator[Any]

    Definition Classes
    Product
    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) use productIterator instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Client[Req, Rep]

Inherited from AnyRef

Inherited from Any