com.twitter.finagle.builder

ClientBuilder

class ClientBuilder[Req, Rep, HasCluster, HasCodec, HasHostConnectionLimit] extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ClientBuilder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type FullySpecifiedConfig = ClientConfig[Req, Rep, Yes, Yes, Yes]

  2. type This = ClientBuilder[Req, Rep, HasCluster, HasCodec, HasHostConnectionLimit]

  3. type ThisConfig = ClientConfig[Req, Rep, HasCluster, HasCodec, HasHostConnectionLimit]

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. def build()(implicit THE_BUILDER_IS_NOT_FULLY_SPECIFIED_SEE_ClientBuilder_DOCUMENTATION: ClientConfigEvidence[HasCluster, HasCodec, HasHostConnectionLimit]): Service[Req, Rep]

    Construct a Service.

  8. def buildFactory()(implicit THE_BUILDER_IS_NOT_FULLY_SPECIFIED_SEE_ClientBuilder_DOCUMENTATION: ClientConfigEvidence[HasCluster, HasCodec, HasHostConnectionLimit]): ServiceFactory[Req, Rep]

    Construct a ServiceFactory.

    Construct a ServiceFactory. This is useful for stateful protocols (e.g., those that support transactions or authentication).

  9. def channelFactory(cf: ChannelFactory): This

    Use the given channel factory instead of the default.

    Use the given channel factory instead of the default. Note that when using a non-default ChannelFactory, finagle can't meaningfully reference count factory usage, and so the caller is responsible for calling releaseExternalResources().

  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def cluster(cluster: Cluster[SocketAddress]): ClientBuilder[Req, Rep, Yes, HasCodec, HasHostConnectionLimit]

    Specify a cluster directly.

    Specify a cluster directly. A com.twitter.finagle.builder.Cluster defines a dynamic mechanism for specifying a set of endpoints to which this client remains connected.

  12. def codec[Req1, Rep1](codecFactory: (ClientCodecConfig) ⇒ Codec[Req1, Rep1]): ClientBuilder[Req1, Rep1, HasCluster, Yes, HasHostConnectionLimit]

    A variation of codec for codecs that support only client-codecs.

  13. def codec[Req1, Rep1](codecFactory: CodecFactory[Req1, Rep1]): ClientBuilder[Req1, Rep1, HasCluster, Yes, HasHostConnectionLimit]

    A variation of {{codec}} that supports codec factories.

    A variation of {{codec}} that supports codec factories. This is used by codecs that need dynamic construction, but should be transparent to the user.

  14. def codec[Req1, Rep1](codec: Codec[Req1, Rep1]): ClientBuilder[Req1, Rep1, HasCluster, Yes, HasHostConnectionLimit]

    Specify the codec.

    Specify the codec. The codec implements the network protocol used by the client, and consequently determines the {{Req}} and {{Rep}} type variables. One of the codec variations is required.

  15. def connectTimeout(duration: Duration): This

    The connect timeout is the timeout applied to the acquisition of a Service.

    The connect timeout is the timeout applied to the acquisition of a Service. This includes both queueing time (eg. because we cannot create more connections due to {{hostConnectionLimit}} and there are more than {{hostConnectionLimit}} requests outstanding) as well as physical connection time. Futures returned from {{factory()}} will always be satisfied within this timeout.

  16. def copy[Req1, Rep1, HasCluster1, HasCodec1, HasHostConnectionLimit1](config: ClientConfig[Req1, Rep1, HasCluster1, HasCodec1, HasHostConnectionLimit1]): ClientBuilder[Req1, Rep1, HasCluster1, HasCodec1, HasHostConnectionLimit1]

    Attributes
    protected
  17. def daemon(daemonize: Boolean): This

    When true, the client is daemonized.

    When true, the client is daemonized. As with java threads, a process can exit only when all remaining clients are daemonized. False by default.

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

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

    Definition Classes
    AnyRef → Any
  20. def expHostConnectionBufferSize(size: Int): This

    Experimental option to buffer size connections from the pool.

    Experimental option to buffer size connections from the pool. The buffer is fast and lock-free, reducing contention for services with very high requests rates. The buffer size should be sized roughly to the expected concurrency. Buffers sized by power-of-twos may be faster due to the use of modular arithmetic.

    Note: This will be integrated into the mainline pool, at which time the experimental option will go away.

  21. def failFast(onOrOff: Boolean): This

    Marks a host dead on connection failure.

    Marks a host dead on connection failure. The host remains dead until we succesfully connect.

    Intermediate connection attempts *are* respected, but host availability is turned off during the reconnection period.

  22. def failureAccrual(failureAccrual: ServiceFactoryWrapper): This

  23. def failureAccrualFactory(factory: (Timer) ⇒ ServiceFactoryWrapper): This

  24. def failureAccrualParams(params: (Int, Duration)): This

    Use the given paramters for failure accrual.

    Use the given paramters for failure accrual. The first parameter is the number of *successive* failures that are required to mark a host failed. The second paramter specifies how long the host is dead for, once marked.

  25. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  27. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  28. def hostConnectionCoresize(value: Int): This

    The core size of the connection pool: the pool is not shrinked below this limit.

  29. def hostConnectionIdleTime(timeout: Duration): This

    The amount of time a connection is allowed to linger (when it otherwise would have been closed by the pool) before being closed.

  30. def hostConnectionLimit(value: Int): ClientBuilder[Req, Rep, HasCluster, HasCodec, Yes]

    The maximum number of connections that are allowed per host.

    The maximum number of connections that are allowed per host. Required. Finagle guarantees to to never have more active connections than this limit.

  31. def hostConnectionMaxIdleTime(timeout: Duration): This

    The maximum time a connection is allowed to linger unused.

  32. def hostConnectionMaxLifeTime(timeout: Duration): This

    The maximum time a connection is allowed to exist, regardless of occupancy.

  33. def hostConnectionMaxWaiters(nWaiters: Int): This

    The maximum queue size for the connection pool.

  34. def hosts(address: SocketAddress): ClientBuilder[Req, Rep, Yes, HasCodec, HasHostConnectionLimit]

    A convenience method for specifying a one-host java.net.SocketAddress client.

  35. def hosts(addresses: Seq[SocketAddress]): ClientBuilder[Req, Rep, Yes, HasCodec, HasHostConnectionLimit]

    A variant of {{hosts}} that takes a sequence of java.net.SocketAddress instead.

  36. def hosts(hostnamePortCombinations: String): ClientBuilder[Req, Rep, Yes, HasCodec, HasHostConnectionLimit]

    Specify the set of hosts to connect this client to.

    Specify the set of hosts to connect this client to. Requests will be load balanced across these. This is a shorthand form for specifying a cluster.

    One of the {{hosts}} variations or direct specification of the cluster (via {{cluster}}) is required.

  37. def httpProxy(httpProxy: SocketAddress): This

    Make connections via the given HTTP proxy.

    Make connections via the given HTTP proxy. If this is defined concurrently with socksProxy, the order in which they are applied is undefined.

  38. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  39. def keepAlive(value: Boolean): This

    Apply TCP keepAlive ({{SO_KEEPALIVE}} socket option).

  40. def logger(logger: Logger): This

    Log very detailed debug information to the given logger.

  41. def monitor(mFactory: (String) ⇒ Monitor): This

  42. def name(value: String): This

    Give a meaningful name to the client.

    Give a meaningful name to the client. Required.

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

    Definition Classes
    AnyRef
  44. final def notify(): Unit

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

    Definition Classes
    AnyRef
  46. def readerIdleTimeout(duration: Duration): This

    The maximum time a connection may have received no data.

  47. def recvBufferSize(value: Int): This

    Sets the TCP recv buffer size.

  48. def reportHostStats(receiver: StatsReceiver): This

    Report per host stats to the given {{StatsReceiver}}.

    Report per host stats to the given {{StatsReceiver}}. The statsReceiver will be scoped per client, like this: client/connect_latency_ms_max/0.0.0.0:64754

  49. def reportTo(receiver: StatsReceiver): This

    Report stats to the given {{StatsReceiver}}.

    Report stats to the given {{StatsReceiver}}. This will report verbose global statistics and counters, that in turn may be exported to monitoring applications. NB: per hosts statistics will *NOT* be exported to this receiver

    See also

    reportHostStats(receiver: StatsReceiver)

  50. def requestTimeout(duration: Duration): This

    The request timeout is the time given to a *single* request (if there are retries, they each get a fresh request timeout).

    The request timeout is the time given to a *single* request (if there are retries, they each get a fresh request timeout). The timeout is applied only after a connection has been acquired. That is: it is applied to the interval between the dispatch of the request and the receipt of the response.

  51. def retries(value: Int): This

    The number of retries applied.

    The number of retries applied. Only applicable to service-builds ({{build()}})

  52. def retryPolicy(value: RetryPolicy[Try[Nothing]]): This

  53. def sendBufferSize(value: Int): This

    Sets the TCP send buffer size.

  54. def socksProxy(socksProxy: SocketAddress): This

    Make connections via the given SOCKS proxy.

    Make connections via the given SOCKS proxy. If this is defined concurrently with httpProxy, the order in which they are applied is undefined.

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

    Definition Classes
    AnyRef
  56. def tcpConnectTimeout(duration: Duration): This

    Specify the TCP connection timeout.

  57. def timeout(duration: Duration): This

    Total request timeout.

    Total request timeout. This timeout is applied from the issuance of a request (through {{service(request)}}) until the satisfaction of that reply future. No request will take longer than this.

    Applicable only to service-builds ({{build()}})

  58. def tls(sslContext: SSLContext, hostname: Option[String]): This

    Encrypt the connection with SSL.

    Encrypt the connection with SSL. The Engine to use can be passed into the client. This allows the user to use client certificates SSL Hostname Validation is performed, on the passed in hostname

  59. def tls(sslContext: SSLContext): This

    Encrypt the connection with SSL.

    Encrypt the connection with SSL. The Engine to use can be passed into the client. This allows the user to use client certificates No SSL Hostname Validation is performed

  60. def tls(hostname: String): This

    Encrypt the connection with SSL.

    Encrypt the connection with SSL. Hostname verification will be provided against the given hostname.

  61. def tlsWithoutValidation(): This

    Do not perform TLS validation.

    Do not perform TLS validation. Probably dangerous.

  62. def toString(): String

    Definition Classes
    ClientBuilder → AnyRef → Any
  63. def tracer(t: Tracer): This

    Specifies a tracer that receives trace events.

    Specifies a tracer that receives trace events. See com.twitter.finagle.tracing for details.

  64. def unsafeBuild(): Service[Req, Rep]

    Construct a Service, with runtime checks for builder completeness.

  65. def unsafeBuildFactory(): ServiceFactory[Req, Rep]

    Construct a ServiceFactory, with runtime checks for builder completeness.

  66. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  69. def withConfig[Req1, Rep1, HasCluster1, HasCodec1, HasHostConnectionLimit1](f: (ClientConfig[Req, Rep, HasCluster, HasCodec, HasHostConnectionLimit]) ⇒ ClientConfig[Req1, Rep1, HasCluster1, HasCodec1, HasHostConnectionLimit1]): ClientBuilder[Req1, Rep1, HasCluster1, HasCodec1, HasHostConnectionLimit1]

    Attributes
    protected
  70. def writerIdleTimeout(duration: Duration): This

    The maximum time a connection may not have sent any data.

Deprecated Value Members

  1. def build(THE_BUILDER_IS_NOT_FULLY_SPECIFIED_SEE_ClientBuilder_DOCUMENTATION: =:=[ThisConfig, FullySpecifiedConfig]): Service[Req, Rep]

    Annotations
    @deprecated
    Deprecated

    (Since version 5.0.1) Used for ABI compat

  2. def buildFactory(THE_BUILDER_IS_NOT_FULLY_SPECIFIED_SEE_ClientBuilder_DOCUMENTATION: =:=[ThisConfig, FullySpecifiedConfig]): ServiceFactory[Req, Rep]

    Annotations
    @deprecated
    Deprecated

    (Since version 5.0.1) Used for ABI compat

  3. def connectionTimeout(duration: Duration): This

    Annotations
    @deprecated
    Deprecated

    (Since version 5.0.1) Use tcpConnectTimeout instead

  4. def expFailFast(onOrOff: Boolean): This

    Annotations
    @deprecated
    Deprecated

    (Since version 5.3.10)

  5. def tracerFactory(t: Tracer): This

    Annotations
    @deprecated
    Deprecated

    (Since version 7.0.0) Use tracer() instead

  6. def tracerFactory(factory: () ⇒ Tracer): This

    Specifies a tracer that receives trace events.

    Specifies a tracer that receives trace events. See com.twitter.finagle.tracing for details.

    Annotations
    @deprecated
    Deprecated

    (Since version 7.0.0) Use tracer() instead

Inherited from AnyRef

Inherited from Any

Ungrouped