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 = ...) 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 = ...)

    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 hostStatsReceiver: StatsReceiver

  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. val maxIdletime: Duration

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

  18. val maxLifetime: Duration

    The maximum lifetime for any Service

  19. val monitor: Monitor

  20. val name: String

    A name identifying the client.

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

    Definition Classes
    AnyRef
  22. 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
  23. 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
  24. 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
  25. 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
  26. val newStack: (Group[SocketAddress]) ⇒ ServiceFactory[Req, Rep]

  27. final def notify(): Unit

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

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

    The pool used to cache idle service (connection).

  30. val requestTimeout: Duration

    The maximum time that any request is allowed to take.

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

  32. val statsReceiver: StatsReceiver

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

    Definition Classes
    AnyRef
  34. val timer: Timer

  35. val tracer: Tracer

  36. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Client[Req, Rep]

Inherited from AnyRef

Inherited from Any

Ungrouped