Class/Object

com.twitter.finagle.client

DefaultClient

Related Docs: object DefaultClient | package client

Permalink

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

    Permalink

    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

    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. final def asInstanceOf[T0]: T0

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

    Permalink
  6. def clone(): AnyRef

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

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef
  9. val failFast: Boolean

    Permalink

    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]

    Permalink

    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

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. val hostStatsReceiver: StatsReceiver

    Permalink
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. val loadBalancer: LoadBalancerFactory

    Permalink
  16. val maxIdletime: Duration

    Permalink

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

  17. val maxLifetime: Duration

    Permalink

    The maximum lifetime for any Service

  18. val monitor: Monitor

    Permalink
  19. val name: String

    Permalink

    A name identifying the client.

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

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

    Permalink

    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]

    Permalink

    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]

    Permalink

    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]

    Permalink

    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]

    Permalink

    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]

    Permalink

    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]

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

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

    Permalink
  30. final def notify(): Unit

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

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

    Permalink

    The pool used to cache idle service (connection).

  33. val reporter: ReporterFactory

    Permalink
  34. val requestTimeout: Duration

    Permalink

    The maximum time that any request is allowed to take.

  35. val serviceTimeout: Duration

    Permalink

    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

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

    Permalink
    Definition Classes
    AnyRef
  38. val timer: Timer

    Permalink
  39. val tracer: Tracer

    Permalink
  40. final def wait(): Unit

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

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

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

Deprecated Value Members

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

    Permalink
    Definition Classes
    Client
    Annotations
    @deprecated
    Deprecated

    (Since version 6.7.x) Use destination names

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

    Permalink
    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