Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package twitter

    Start with com.twitter.finagle.

    Definition Classes
    com
  • package finagle

    Finagle is an extensible RPC system.

    Finagle is an extensible RPC system.

    Services are represented by class com.twitter.finagle.Service. Clients make use of com.twitter.finagle.Service objects while servers implement them.

    Finagle contains a number of protocol implementations; each of these implement Client and/or com.twitter.finagle.Server. For example, Finagle's HTTP implementation, com.twitter.finagle.Http (in package finagle-http), exposes both.

    Thus a simple HTTP server is built like this:

    import com.twitter.finagle.{Http, Service}
    import com.twitter.finagle.http.{Request, Response}
    import com.twitter.util.{Await, Future}
    
    val service = new Service[Request, Response] {
      def apply(req: Request): Future[Response] =
        Future.value(Response())
    }
    val server = Http.server.serve(":8080", service)
    Await.ready(server)

    We first define a service to which requests are dispatched. In this case, the service returns immediately with a HTTP 200 OK response, and with no content.

    This service is then served via the Http protocol on TCP port 8080. Finally we wait for the server to stop serving.

    We can now query our web server:

    % curl -D - localhost:8080
    HTTP/1.1 200 OK

    Building an HTTP client is also simple. (Note that type annotations are added for illustration.)

    import com.twitter.finagle.{Http, Service}
    import com.twitter.finagle.http.{Request, Response}
    import com.twitter.util.{Future, Return, Throw}
    
    val client: Service[Request, Response] = Http.client.newService("localhost:8080")
    val f: Future[Response] = client(Request()).respond {
      case Return(rep) =>
        printf("Got HTTP response %s\n", rep)
      case Throw(exc) =>
        printf("Got error %s\n", exc)
    }

    Http.client.newService("localhost:8080") constructs a new com.twitter.finagle.Service instance connected to localhost TCP port 8080. We then issue a HTTP/1.1 GET request to URI "/". The service returns a com.twitter.util.Future representing the result of the operation. We listen to this future, printing an appropriate message when the response arrives.

    The Finagle homepage contains useful documentation and resources for using Finagle.

    Definition Classes
    twitter
  • object Memcached extends Client[Command, Response] with Server[Command, Response]

    Stack based Memcached client.

    Stack based Memcached client.

    For example, a default client can be built through:

    Definition Classes
    finagle
    Examples:
    1. val client = Memcached.newRichClient(dest)

      If you want to provide more finely tuned configurations:

    2. ,
    3. val client =
        Memcached.client
          .withEjectFailedHost(true)
          .withTransport.connectTimeout(100.milliseconds))
          .withRequestTimeout(10.seconds)
          .withSession.acquisitionTimeout(20.seconds)
          .newRichClient(dest, "memcached_client")
  • Client
  • Server

case class Client(stack: Stack[ServiceFactory[Command, Response]] = Client.stack, params: Params = Client.params) extends PushStackClient[Command, Response, Client] with WithPartitioningStrategy[Client] with MemcachedRichClient with Product with Serializable

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Client
  2. Serializable
  3. Product
  4. Equals
  5. MemcachedRichClient
  6. WithPartitioningStrategy
  7. PushStackClient
  8. EndpointerStackClient
  9. WithSessionQualifier
  10. WithClientSession
  11. WithClientTransport
  12. WithClientAdmissionControl
  13. ClientParams
  14. CommonParams
  15. StackClient
  16. StackBasedClient
  17. Transformable
  18. Parameterized
  19. Client
  20. AnyRef
  21. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Client(stack: Stack[ServiceFactory[Command, Response]] = Client.stack, params: Params = Client.params)

Type Members

  1. type In = Response

    Type of the messages which will be received from the transporter level by the PushSession.

    Type of the messages which will be received from the transporter level by the PushSession.

    Attributes
    protected
    Definition Classes
    ClientPushStackClient
  2. type Out = Command

    Type of messages which will be written to the transporter level by the PushSession.

    Type of messages which will be written to the transporter level by the PushSession.

    Attributes
    protected
    Definition Classes
    ClientPushStackClient
  3. type SessionT = PipeliningClientPushSession[Response, Command]

    Refined type of the PushSession.

    Refined type of the PushSession.

    Attributes
    protected
    Definition Classes
    ClientPushStackClient
    Note

    the type of SessionT is significant as it represents the type which will receive the inbound events from the handle. It is possible to transition between session implementations in order to handle protocol transitions (e.g. negotiation). For example, newSession can return the type which will receive the first phase of inbound events and toService can transform the type via future composition. In this way, the relationship between newSession and toService represent a state machine transition.

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. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def configured[P](psp: (P, Param[P])): Client

    Creates a new StackClient with parameter psp._1 and Stack Param type psp._2.

    Creates a new StackClient with parameter psp._1 and Stack Param type psp._2.

    Definition Classes
    ClientEndpointerStackClientStackClientParameterized
  7. def configured[P](p: P)(implicit arg0: Param[P]): Client

    Creates a new StackClient with parameter p.

    Creates a new StackClient with parameter p.

    Definition Classes
    EndpointerStackClientStackClientParameterized
  8. def configuredParams(newParams: Params): Client

    Creates a new StackClient with additional parameters newParams.

    Creates a new StackClient with additional parameters newParams.

    Definition Classes
    EndpointerStackClientStackClientParameterized
  9. def connectionsPerEndpoint(connections: Int): Client

    Configures the number of concurrent connections a single endpoint has.

    Configures the number of concurrent connections a single endpoint has. The connections are load balanced over which allows the pipelined client to avoid head-of-line blocking and reduce its latency.

    We've empirically found that two is a good default for this, but it can be increased at the cost of additional connection overhead.

  10. def copy1(stack: Stack[ServiceFactory[Command, Response]], params: Params): Client

    A copy constructor in lieu of defining StackClient as a case class.

    A copy constructor in lieu of defining StackClient as a case class.

    Attributes
    protected
    Definition Classes
    ClientPushStackClientEndpointerStackClient
  11. final def endpointer: Stackable[ServiceFactory[Command, Response]]

    Defines the service factory, which establishes connections to a remote peer on apply and returns a service which can write messages onto the wire and read them off of the wire.

    Defines the service factory, which establishes connections to a remote peer on apply and returns a service which can write messages onto the wire and read them off of the wire.

    Concrete StackClient implementations are expected to specify this.

    Attributes
    protected
    Definition Classes
    PushStackClientEndpointerStackClient
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def filtered(filter: Filter[Command, Response, Command, Response]): Client

    Prepends filter to the top of the client.

    Prepends filter to the top of the client. That is, after materializing the client (newClient/newService) filter will be the first element which requests flow through. This is a familiar chaining combinator for filters and is particularly useful for StdStackClient implementations that don't expose services but instead wrap the resulting service with a rich API.

    Definition Classes
    ClientEndpointerStackClient
  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def injectors: Seq[ClientParamsInjector]
    Attributes
    protected
    Definition Classes
    EndpointerStackClient
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def newClient(dest: Name, label0: String): ServiceFactory[Command, Response]

    Create a new client connected to dest.

    Create a new client connected to dest. See the user guide for details on destination names.

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

    label0

    if an empty String is provided, then the label from the Label Stack.Params is used. If that is also an empty String, then dest is used.

    Definition Classes
    EndpointerStackClientClient
  20. final def newClient(dest: String, label: String): ServiceFactory[Command, Response]

    Create a new client connected to dest.

    Create a new client connected to dest. See the user guide for details on destination names.

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

    Definition Classes
    Client
  21. final def newClient(dest: String): ServiceFactory[Command, Response]

    Create a new client connected to dest.

    Create a new client connected to dest. See the user guide for details on destination names.

    Definition Classes
    Client
  22. def newPushTransporter(sa: SocketAddress): PushTransporter[Response, Command]

    Construct a new PushTransporter with the appropriately configured pipeline.

    Construct a new PushTransporter with the appropriately configured pipeline.

    Attributes
    protected
    Definition Classes
    ClientPushStackClient
  23. def newRichClient(dest: String): memcached.Client

    Constructs a memcached.Client that dispatches requests over dest.

    Constructs a memcached.Client that dispatches requests over dest. When dest resolves to multiple hosts, the hosts are hashed across a ring with key affinity. The key hashing algorithm can be configured via the withKeyHasher method on Memcached.client. Failing hosts can be ejected from the hash ring if withEjectFailedHost is set to true. Note, the current implementation only supports bound Names.

    Definition Classes
    MemcachedRichClient
  24. def newRichClient(dest: Name, label: String): memcached.Client

    Constructs a memcached.Client that dispatches requests over dest.

    Constructs a memcached.Client that dispatches requests over dest. When dest resolves to multiple hosts, the hosts are hashed across a ring with key affinity. The key hashing algorithm can be configured via the withKeyHasher method on Memcached.client. Failing hosts can be ejected from the hash ring if withEjectFailedHost is set to true. Note, the current implementation only supports bound Names.

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

    Definition Classes
    MemcachedRichClient
  25. def newService(dest: Name, label: String): Service[Command, Response]

    Create a new service which dispatches requests to dest.

    Create a new service which dispatches requests to dest. See the user guide for details on destination names.

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

    Definition Classes
    EndpointerStackClientClient
  26. final def newService(dest: String, label: String): Service[Command, Response]

    Create a new service which dispatches requests to dest.

    Create a new service which dispatches requests to dest. See the user guide for details on destination names.

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

    Create a new service which dispatches requests to dest.

    Create a new service which dispatches requests to dest. See the user guide for details on destination names.

    Definition Classes
    Client
  28. def newSession(handle: PushChannelHandle[Response, Command]): Future[SessionT]

    Construct a new push session from the provided PushChannelHandle generated from the PushTransporter

    Construct a new push session from the provided PushChannelHandle generated from the PushTransporter

    Attributes
    protected
    Definition Classes
    ClientPushStackClient
  29. def newTwemcacheClient(dest: Name, label: String): TwemcacheClient

    Constructs a memcached.Client that dispatches requests over dest.

    Constructs a memcached.Client that dispatches requests over dest. When dest resolves to multiple hosts, the hosts are hashed across a ring with key affinity. The key hashing algorithm can be configured via the withKeyHasher method on Memcached.client. Failing hosts can be ejected from the hash ring if withEjectFailedHost is set to true. Note, the current implementation only supports bound Names.

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

    Definition Classes
    ClientMemcachedRichClient
  30. def newTwemcacheClient(dest: String): TwemcacheClient

    Constructs a memcached.Client that dispatches requests over dest.

    Constructs a memcached.Client that dispatches requests over dest. When dest resolves to multiple hosts, the hosts are hashed across a ring with key affinity. The key hashing algorithm can be configured via the withKeyHasher method on Memcached.client. Failing hosts can be ejected from the hash ring if withEjectFailedHost is set to true. Note, the current implementation only supports bound Names.

    Definition Classes
    MemcachedRichClient
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. val params: Params

    The current parameter map.

    The current parameter map.

    Definition Classes
    ClientStackClientParameterized
  34. def productElementNames: Iterator[String]
    Definition Classes
    Product
  35. final def registerTransporter(transporterName: String): Unit

    Export info about the transporter type so that we can query info about its implementation at runtime.

    Export info about the transporter type so that we can query info about its implementation at runtime.

    Attributes
    protected
    Definition Classes
    StackClient
  36. val stack: Stack[ServiceFactory[Command, Response]]

    The current stack.

    The current stack.

    Definition Classes
    ClientStackClient
  37. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  38. def toService(session: SessionT): Future[Service[Command, Response]]

    Build a Service from the provided push session

    Build a Service from the provided push session

    Attributes
    protected
    Definition Classes
    ClientPushStackClient
  39. def transformed(t: Transformer): StackClient[Command, Response]

    Definition Classes
    StackClientTransformable
    See also

    withStack

  40. def transformers: Seq[StackTransformer]
    Attributes
    protected
    Definition Classes
    EndpointerStackClient
  41. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  42. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  43. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  44. val withAdmissionControl: ClientAdmissionControlParams[Client]

    An entry point for configuring the clients' admission control

    An entry point for configuring the clients' admission control

    Definition Classes
    ClientWithClientAdmissionControl
  45. def withEjectFailedHost(eject: Boolean): Client

    Whether to eject failing hosts from the hash ring based on failure accrual.

    Whether to eject failing hosts from the hash ring based on failure accrual. By default, this is off.

    The failing signal currently is gathered from com.twitter.finagle.partitioning.ConsistentHashingFailureAccrualFactory

    Definition Classes
    ClientWithPartitioningStrategy
  46. def withExceptionStatsHandler(exceptionStatsHandler: ExceptionStatsHandler): Client

    Configures this server or client with given exception stats handler.

    Configures this server or client with given exception stats handler.

    Definition Classes
    ClientCommonParams
  47. def withExecutionOffloaded(pool: FuturePool): Client

    Configures this server or client to shift user-defined computation (com.twitter.util.Future callbacks and transformations) off of IO threads into a given FuturePool.

    Configures this server or client to shift user-defined computation (com.twitter.util.Future callbacks and transformations) off of IO threads into a given FuturePool.

    By default, Finagle executes all futures in the IO threads, minimizing context switches. Given there is usually a fixed number of IO threads shared across a JVM process, it's critically important to ensure they aren't being blocked by the application code, affecting system's responsiveness. Shifting application-level work onto a dedicated FuturePool or ExecutorService offloads IO threads, which may improve throughput in CPU-bound systems.

    As always, run your own tests before enabling this feature.

    Definition Classes
    ClientCommonParams
  48. def withExecutionOffloaded(executor: ExecutorService): Client

    Configures this server or client to shift user-defined computation (com.twitter.util.Future callbacks and transformations) off of IO threads into a given ExecutorService.

    Configures this server or client to shift user-defined computation (com.twitter.util.Future callbacks and transformations) off of IO threads into a given ExecutorService.

    By default, Finagle executes all futures in the IO threads, minimizing context switches. Given there is usually a fixed number of IO threads shared across a JVM process, it's critically important to ensure they aren't being blocked by the application code, affecting system's responsiveness. Shifting application-level work onto a dedicated FuturePool or ExecutorService offloads IO threads, which may improve throughput in CPU-bound systems.

    As always, run your own tests before enabling this feature.

    Definition Classes
    ClientCommonParams
  49. def withKeyHasher(hasher: KeyHasher): Client

    Defines the hash function to use for partitioned clients when mapping keys to partitions.

    Defines the hash function to use for partitioned clients when mapping keys to partitions.

    Definition Classes
    ClientWithPartitioningStrategy
  50. def withLabel(label: String): Client

    Configures this server or client with given label (default: empty string).

    Configures this server or client with given label (default: empty string).

    The label value is used for stats reporting to scope stats reported from different clients/servers to a single stats receiver.

    Definition Classes
    ClientCommonParams
  51. def withLabels(keywords: String*): Client
    Definition Classes
    CommonParams
  52. def withMonitor(monitor: Monitor): Client

    Configures this server or client with given util.Monitor (default: com.twitter.finagle.util.NullMonitor).

    Configures this server or client with given util.Monitor (default: com.twitter.finagle.util.NullMonitor).

    Monitors are Finagle's out-of-band exception reporters. Whenever an exception is thrown on a request path, it's reported to the monitor. The configured Monitor is composed (see below for how composition works) with the default monitor implementation, com.twitter.finagle.util.DefaultMonitor, which logs these exceptions.

    Monitors are wired into the server or client stacks via com.twitter.finagle.filter.MonitorFilter and are applied to the following kinds of exceptions:

    • Synchronous exceptions thrown on request path, Service.apply(request)
    • Asynchronous exceptions (failed futures) thrown on request path, Service.apply(request)
    • Exceptions thrown from respond, onSuccess, onFailure future callbacks
    • Fatal exceptions thrown from map, flatMap, transform future continuations

    Put it this way, we apply Monitor.handle to an exception if we would otherwise "lose" it, i.e. when it's not connected to the Future, nor is it connected to the call stack.

    You can compose multiple monitors if you want to extend or override the standard behavior, defined in DefaultMonitor.

    import com.twitter.util.Monitor
    
    val consoleMonitor = new Monitor {
      def handle(exc: Throwable): Boolean = {
        Console.err.println(exc.toString)
        false // continue handling with the next monitor (usually DefaultMonitor)
       }
    }
    
    $.withMonitor(consoleMonitor)

    Returning true form within a monitor effectively terminates the monitor chain so no exceptions are propagated down to the next monitor.

    Definition Classes
    ClientCommonParams
  53. def withNumReps(reps: Int): Client

    Duplicate each node across the hash ring according to reps.

    Duplicate each node across the hash ring according to reps.

    Definition Classes
    ClientWithPartitioningStrategy
    See also

    com.twitter.hashing.ConsistentHashingDistributor for more details.

  54. def withParams(params: Params): Client

    Creates a new StackClient with params used to configure this StackClient's stack.

    Creates a new StackClient with params used to configure this StackClient's stack.

    Definition Classes
    EndpointerStackClientStackClientParameterized
  55. def withRequestTimeout(timeout: Duration): Client

    Configures the request timeout of this server or client (default: unbounded).

    Configures the request timeout of this server or client (default: unbounded).

    If the request has not completed within the given timeout, the pending work will be interrupted via com.twitter.util.Future.raise.

    Client's Request Timeout

    The client request timeout is the maximum amount of 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.

    Server's Request Timeout

    The server request timeout is the maximum amount of time, a server is allowed to spend handling the incoming request. Using the Finagle terminology, this is an amount of time after which a non-satisfied future returned from the user-defined service times out.

    Definition Classes
    ClientCommonParams
    See also

    https://twitter.github.io/finagle/guide/Clients.html#timeouts-expiration

  56. def withRequestTimeout(timeout: Tunable[Duration]): Client

    Configures the Tunable request timeout of this server or client (if applying the Tunable produces a value of None, an unbounded timeout is used for the request).

    Configures the Tunable request timeout of this server or client (if applying the Tunable produces a value of None, an unbounded timeout is used for the request).

    If the request has not completed within the Duration resulting from timeout.apply(), the pending work will be interrupted via com.twitter.util.Future.raise.

    Client's Request Timeout

    The client request timeout is the maximum amount of 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.

    Server's Request Timeout

    The server request timeout is the maximum amount of time, a server is allowed to spend handling the incoming request. Using the Finagle terminology, this is an amount of time after which a non-satisfied future returned from the user-defined service times out.

    Definition Classes
    CommonParams
    See also

    https://twitter.github.io/finagle/guide/Clients.html#timeouts-expiration and https://twitter.github.io/finagle/guide/Configuration.html#tunables

  57. def withResponseClassifier(responseClassifier: ResponseClassifier): Client

    Configure a com.twitter.finagle.service.ResponseClassifier which is used to determine the result of a request/response.

    Configure a com.twitter.finagle.service.ResponseClassifier which is used to determine the result of a request/response.

    This allows developers to give Finagle the additional application-specific knowledge necessary in order to properly classify responses. Without this, Finagle cannot make judgements about application-level failures as it only has a narrow understanding of failures (for example: transport level, timeouts, and nacks).

    As an example take an HTTP server that returns a response with a 500 status code. To Finagle this is a successful request/response. However, the application developer may want to treat all 500 status codes as failures and can do so via setting a com.twitter.finagle.service.ResponseClassifier.

    ResponseClassifier is a PartialFunction and as such multiple classifiers can be composed together via PartialFunction.orElse.

    Response classification is independently configured on the client and server. For client-side response classification using com.twitter.finagle.builder.ClientBuilder, see com.twitter.finagle.builder.ClientBuilder.responseClassifier

    Definition Classes
    ClientCommonParams
    Note

    If unspecified, the default classifier is com.twitter.finagle.service.ResponseClassifier.Default which is a total function fully covering the input domain.

    See also

    com.twitter.finagle.http.service.HttpResponseClassifier for some HTTP classification tools.

  58. def withRetryBackoff(backoff: Backoff): Client

    Configures the requeue backoff policy of this client (default: no delay).

    Configures the requeue backoff policy of this client (default: no delay).

    The policy encoded Backoff is used to calculate the next duration to delay each retry.

    Definition Classes
    ClientClientParams
    See also

    https://twitter.github.io/finagle/guide/Clients.html#retries

  59. def withRetryBudget(budget: RetryBudget): Client

    Configures the retry budget of this client (default: allows for about 20% of the total requests to be retried on top of 10 retries per second).

    Configures the retry budget of this client (default: allows for about 20% of the total requests to be retried on top of 10 retries per second).

    This budget is shared across requests and governs the number of retries that can be made by this client.

    Definition Classes
    ClientClientParams
    Note

    The retry budget helps prevent clients from overwhelming the downstream service.

    See also

    https://twitter.github.io/finagle/guide/Clients.html#retries

  60. val withSession: ClientSessionParams[Client]

    An entry point for configuring the client's session.

    An entry point for configuring the client's session.

    Definition Classes
    ClientWithClientSession
  61. val withSessionQualifier: SessionQualificationParams[Client]

    An entry point for configuring the client's session qualifiers (e.g.

    An entry point for configuring the client's session qualifiers (e.g. circuit breakers).

    Definition Classes
    ClientWithSessionQualifier
    See also

    https://twitter.github.io/finagle/guide/Clients.html#circuit-breaking

  62. def withStack(fn: (Stack[ServiceFactory[Command, Response]]) => Stack[ServiceFactory[Command, Response]]): Client

    A new StackClient using the function to create a new Stack.

    A new StackClient using the function to create a new Stack.

    The input to fn is the client's current stack. This API allows for easier usage when writing code that uses method chaining.

    This method is similar to transformed while providing easier API ergonomics for one-off Stack changes.

    Definition Classes
    ClientEndpointerStackClientStackClient
    Example:
    1. From Scala:

      import com.twitter.finagle.Http
      
      Http.client.withStack(_.prepend(MyStackModule))

      From Java:

      import com.twitter.finagle.Http;
      import static com.twitter.util.Function.func;
      
      Http.client().withStack(func(stack -> stack.prepend(MyStackModule)));
    See also

    withStack(Stack)

    transformed

  63. def withStack(stack: Stack[ServiceFactory[Command, Response]]): Client

    A new StackClient with the provided stack.

    A new StackClient with the provided stack.

    Definition Classes
    ClientEndpointerStackClientStackClient
    See also

    withStack that takes a Function1 for a more ergonomic API when used with method chaining.

  64. def withStatsReceiver(statsReceiver: StatsReceiver): Client

    Configures this server or client with given stats.StatsReceiver (default: stats.DefaultStatsReceiver).

    Configures this server or client with given stats.StatsReceiver (default: stats.DefaultStatsReceiver).

    Definition Classes
    ClientCommonParams
  65. def withTracer(tracer: Tracer): Client

    Configures this server or client with given tracing.Tracer (default: com.twitter.finagle.tracing.DefaultTracer).

    Configures this server or client with given tracing.Tracer (default: com.twitter.finagle.tracing.DefaultTracer).

    Definition Classes
    ClientCommonParams
    Note

    if you supply com.twitter.finagle.tracing.NullTracer, no trace information will be written, but this does not disable Finagle from propagating trace information. Instead, if traces are being aggregated across your fleet, it will orphan subsequent spans.

  66. val withTransport: ClientTransportParams[Client]

    An entry point for configuring the client's com.twitter.finagle.transport.Transport.

    An entry point for configuring the client's com.twitter.finagle.transport.Transport.

    Transport is a Finagle abstraction over the network connection (i.e., a TCP connection).

    Definition Classes
    ClientWithClientTransport

Deprecated Value Members

  1. def transformed(f: (Stack[ServiceFactory[Command, Response]]) => Stack[ServiceFactory[Command, Response]]): Client

    Creates a new StackClient with f applied to stack.

    Creates a new StackClient with f applied to stack.

    This is the same as withStack.

    Definition Classes
    EndpointerStackClient
    Annotations
    @deprecated
    Deprecated

    (Since version 2018-10-30) Use withStack(Stack[ServiceFactory[Req, Rep]] => Stack[ServiceFactory[Req, Rep]]) instead

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from MemcachedRichClient

Inherited from WithClientSession[Client]

Inherited from WithClientTransport[Client]

Inherited from ClientParams[Client]

Inherited from CommonParams[Client]

Inherited from StackClient[Command, Response]

Inherited from Parameterized[Client]

Inherited from AnyRef

Inherited from Any

Ungrouped