com.twitter.finagle.client

DefaultClient

Related Docs: object DefaultClient | package client

case class DefaultClient[Req, Rep](name: String, endpointer: (SocketAddress, StatsReceiver) ⇒ ServiceFactory[Req, Rep], pool: (StatsReceiver) ⇒ Transformer[Req, Rep] = DefaultPool[Req, Rep](), maxIdletime: Duration = Duration.Top, maxLifetime: Duration = Duration.Top, requestTimeout: Duration = Duration.Top, failFast: Boolean = true, failureAccrual: Transformer[Req, Rep] = ..., serviceTimeout: Duration = Duration.Top, timer: Timer = DefaultTimer.twitter, statsReceiver: StatsReceiver = ClientStatsReceiver, hostStatsReceiver: StatsReceiver = NullStatsReceiver, tracer: Tracer = DefaultTracer, monitor: Monitor = DefaultMonitor, reporter: ReporterFactory = LoadedReporterFactory, loadBalancer: LoadBalancerFactory = DefaultBalancerFactory, newTraceInitializer: Stackable[ServiceFactory[Req, Rep]] = ...) 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.

Self Type
DefaultClient[Req, Rep]
Linear Supertypes
Serializable, Serializable, Product, Equals, finagle.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) ⇒ Transformer[Req, Rep] = DefaultPool[Req, Rep](), maxIdletime: Duration = Duration.Top, maxLifetime: Duration = Duration.Top, requestTimeout: Duration = Duration.Top, failFast: Boolean = true, failureAccrual: Transformer[Req, Rep] = ..., serviceTimeout: Duration = Duration.Top, timer: Timer = DefaultTimer.twitter, statsReceiver: StatsReceiver = ClientStatsReceiver, hostStatsReceiver: StatsReceiver = NullStatsReceiver, tracer: Tracer = DefaultTracer, monitor: Monitor = DefaultMonitor, reporter: ReporterFactory = LoadedReporterFactory, loadBalancer: LoadBalancerFactory = DefaultBalancerFactory, newTraceInitializer: Stackable[ServiceFactory[Req, Rep]] = ...)

    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: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

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

  6. def clone(): AnyRef

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

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

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

    Definition Classes
    AnyRef
  9. val failFast: Boolean

    When enabled, installs a fail-fast module.

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

  10. val failureAccrual: Transformer[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

  11. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  13. val hostStatsReceiver: StatsReceiver

  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. val loadBalancer: LoadBalancerFactory

  16. val maxIdletime: Duration

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

  17. val maxLifetime: Duration

    The maximum lifetime for any Service

  18. val monitor: Monitor

  19. val name: String

    A name identifying the client.

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

    Definition Classes
    AnyRef
  21. 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
  22. 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
  23. 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
  24. 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
    DefaultClientClient
  25. final def newService(dest: String, label: 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
  26. 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
  27. val newStack: (Name) ⇒ ServiceFactory[Req, Rep]

  28. val newStack0: (Var[Addr]) ⇒ ServiceFactory[Req, Rep]

  29. val newTraceInitializer: Stackable[ServiceFactory[Req, Rep]]

  30. final def notify(): Unit

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

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

    The pool used to cache idle service (connection).

  33. val reporter: ReporterFactory

  34. val requestTimeout: Duration

    The maximum time that any request is allowed to take.

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

  36. val statsReceiver: StatsReceiver

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

    Definition Classes
    AnyRef
  38. val timer: Timer

  39. val tracer: Tracer

  40. final def wait(): Unit

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. 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 finagle.Client[Req, Rep]

Inherited from AnyRef

Inherited from Any

Ungrouped