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 = 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 = ..., loadBalancerFactory: LoadBalancerFactory = ...) 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. DefaultClient
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Client
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
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 = ..., loadBalancerFactory: LoadBalancerFactory = ...)

    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 clone(): AnyRef

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

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

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

    Definition Classes
    AnyRef
  11. val failFast: Boolean

    When enabled, installs a fail-fast module.

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

  12. 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

  13. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  15. val globalStatsReceiver: RollupStatsReceiver

  16. val hostStatsReceiver: StatsReceiver

  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. val loadBalancerFactory: LoadBalancerFactory

  19. val maxIdletime: Duration

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

  20. val maxLifetime: Duration

    The maximum lifetime for any Service

  21. val monitor: Monitor

  22. val name: String

    A name identifying the client.

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

    Definition Classes
    AnyRef
  24. def newClient(dest: Name, label: String): ServiceFactory[Req, Rep]

    Create a new client connected to dest.

    Create a new client connected to dest.

    Argument label is used to assign a label to this client. The label is used to display stats, etc.

    Definition Classes
    DefaultClientClient
  25. final def newClient(dest: String, label: String): ServiceFactory[Req, Rep]

    Create a new client connected to dest.

    Create a new client connected to dest.

    Argument label is used to assign a label to this client. The label is used to display stats, etc.

    Definition Classes
    Client
  26. final def newClient(dest: String): ServiceFactory[Req, Rep]

    Create a new client connected to dest.

    Create a new client connected to dest.

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

    Create a new service which dispatches requests to dest.

    Create a new service which dispatches requests to dest.

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

    Create a new service which dispatches requests to dest.

    Create a new service which dispatches requests to dest.

    Argument label is used to assign a label to this client. The label is used to display stats, etc.

    Definition Classes
    Client
  29. val newStack: (Name) ⇒ ServiceFactory[Req, Rep]

  30. val newStack0: (Name) ⇒ 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. val reporter: ReporterFactory

  35. val requestTimeout: Duration

    The maximum time that any request is allowed to take.

  36. 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.

  37. val statsReceiver: StatsReceiver

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

    Definition Classes
    AnyRef
  39. val timer: Timer

  40. val tracer: Tracer

  41. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Deprecated Value Members

  1. final def newClient(dest: Group[SocketAddress]): ServiceFactory[Req, Rep]

    Definition Classes
    Client
    Annotations
    @deprecated
    Deprecated

    (Since version 6.7.x) Use destination names

  2. final def newService(dest: Group[SocketAddress]): Service[Req, Rep]

    Definition Classes
    Client
    Annotations
    @deprecated
    Deprecated

    (Since version 6.7.x) Use destination names

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Client[Req, Rep]

Inherited from AnyRef

Inherited from Any

Ungrouped