Trait

com.twitter.finagle.client

StdStackClient

Related Doc: package client

Permalink

trait StdStackClient[Req, Rep, This <: StdStackClient[Req, Rep, This]] extends EndpointerStackClient[Req, Rep, This]

Self Type
StdStackClient[Req, Rep, This]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StdStackClient
  2. EndpointerStackClient
  3. WithSessionQualifier
  4. WithClientSession
  5. WithClientTransport
  6. WithClientAdmissionControl
  7. ClientParams
  8. CommonParams
  9. StackClient
  10. StackBasedClient
  11. Transformable
  12. Parameterized
  13. Client
  14. AnyRef
  15. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract type Context <: TransportContext

    Permalink

    The type of the transport's context.

    The type of the transport's context.

    Attributes
    protected
  2. abstract type In

    Permalink

    The type we write into the transport.

    The type we write into the transport.

    Attributes
    protected
  3. abstract type Out

    Permalink

    The type we read out of the transport.

    The type we read out of the transport.

    Attributes
    protected

Abstract Value Members

  1. abstract def copy1(stack: Stack[ServiceFactory[Req, Rep]] = this.stack, params: Params = this.params): This { ... /* 2 definitions in type refinement */ }

    Permalink

    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
    StdStackClientEndpointerStackClient
  2. abstract def newDispatcher(transport: Transport[In, Out] { type Context <: StdStackClient.this.Context }): Service[Req, Rep]

    Permalink

    Defines a dispatcher, a function which reconciles the stream based Transport with a Request/Response oriented Service.

    Defines a dispatcher, a function which reconciles the stream based Transport with a Request/Response oriented Service. Together with a Transporter, it forms the foundation of a finagle client. Concrete implementations are expected to specify this.

    Attributes
    protected
    See also

    com.twitter.finagle.dispatch.GenSerialServerDispatcher

  3. abstract def newTransporter(addr: SocketAddress): Transporter[In, Out, Context]

    Permalink

    Defines a typed com.twitter.finagle.client.Transporter for this client.

    Defines a typed com.twitter.finagle.client.Transporter for this client. Concrete StackClient implementations are expected to specify this.

    Attributes
    protected
  4. abstract def params: Params

    Permalink

    The current parameter map.

    The current parameter map.

    Definition Classes
    StackClientParameterized
  5. abstract def stack: Stack[ServiceFactory[Req, Rep]]

    Permalink

    The current stack.

    The current stack.

    Definition Classes
    StackClient

Concrete 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. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def configured[P](psp: (P, Param[P])): This

    Permalink

    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
    EndpointerStackClientStackClientParameterized
  7. def configured[P](p: P)(implicit arg0: Param[P]): This

    Permalink

    Creates a new StackClient with parameter p.

    Creates a new StackClient with parameter p.

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

    Permalink

    Creates a new StackClient with additional parameters newParams.

    Creates a new StackClient with additional parameters newParams.

    Definition Classes
    EndpointerStackClientStackClientParameterized
  9. final def endpointer: Stackable[ServiceFactory[Req, Rep]]

    Permalink

    A stackable module that creates new Transports (via transporter) when applied.

    A stackable module that creates new Transports (via transporter) when applied.

    Attributes
    protected
    Definition Classes
    StdStackClientEndpointerStackClient
  10. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def filtered(filter: Filter[Req, Rep, Req, Rep]): This

    Permalink

    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
    EndpointerStackClient
  13. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

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

    Permalink

    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 display 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
  19. 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. 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 display stats, etc.

    Definition Classes
    Client
  20. final def newClient(dest: String): ServiceFactory[Req, Rep]

    Permalink

    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
  21. 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. 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 display stats, etc.

    Definition Classes
    EndpointerStackClientClient
  22. 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. See the user guide for details on destination names.

    Definition Classes
    Client
  23. 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. See the user guide for details on destination names.

    Definition Classes
    Client
  24. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  26. final def registerTransporter(transporterName: String): Unit

    Permalink

    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
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. def transformed(f: (Stack[ServiceFactory[Req, Rep]]) ⇒ Stack[ServiceFactory[Req, Rep]]): This

    Permalink

    Creates a new StackClient with f applied to stack.

    Creates a new StackClient with f applied to stack.

    For expert users only.

    Definition Classes
    EndpointerStackClient
  30. def transformed(t: Stack.Transformer): StackClient[Req, Rep]

    Permalink

    Transform the stack using the given Transformer.

    Transform the stack using the given Transformer.

    Definition Classes
    StackClientTransformable
  31. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. val withAdmissionControl: ClientAdmissionControlParams[This]

    Permalink

    An entry point for configuring the clients' admission control

    An entry point for configuring the clients' admission control

    Definition Classes
    WithClientAdmissionControl
  35. def withExceptionStatsHandler(exceptionStatsHandler: ExceptionStatsHandler): This

    Permalink

    Configures this server or client with given exception stats handler.

    Configures this server or client with given exception stats handler.

    Definition Classes
    CommonParams
  36. def withLabel(label: String): This

    Permalink

    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
    CommonParams
  37. def withMonitor(monitor: Monitor): This

    Permalink

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

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

    Definition Classes
    CommonParams
  38. def withParams(params: Params): This

    Permalink

    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
  39. def withRequestTimeout(timeout: Tunable[Duration]): This

    Permalink

    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

  40. def withRequestTimeout(timeout: Duration): This

    Permalink

    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
    CommonParams
    See also

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

  41. def withResponseClassifier(responseClassifier: ResponseClassifier): This

    Permalink

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

  42. def withRetryBackoff(backoff: Stream[Duration]): This

    Permalink

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

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

    The backoff policy is represented by a stream of delays (i.e., Stream[Duration]) used to delay each retry.

    Definition Classes
    ClientParams
    See also

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

  43. def withRetryBudget(budget: RetryBudget): This

    Permalink

    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
    ClientParams
    Note

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

    See also

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

  44. val withSession: ClientSessionParams[This]

    Permalink

    An entry point for configuring the client's session.

    An entry point for configuring the client's session.

    Definition Classes
    WithClientSession
  45. val withSessionQualifier: SessionQualificationParams[This]

    Permalink

    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
    WithSessionQualifier
    See also

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

  46. def withStack(stack: Stack[ServiceFactory[Req, Rep]]): This

    Permalink

    A new StackClient with the provided stack.

    A new StackClient with the provided stack.

    Definition Classes
    EndpointerStackClientStackClient
  47. def withStatsReceiver(statsReceiver: StatsReceiver): This

    Permalink

    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
    CommonParams
  48. def withTracer(tracer: Tracer): This

    Permalink

    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
    CommonParams
  49. val withTransport: ClientTransportParams[This]

    Permalink

    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
    WithClientTransport

Inherited from EndpointerStackClient[Req, Rep, This]

Inherited from WithSessionQualifier[This]

Inherited from WithClientSession[This]

Inherited from WithClientTransport[This]

Inherited from WithClientAdmissionControl[This]

Inherited from ClientParams[This]

Inherited from CommonParams[This]

Inherited from StackClient[Req, Rep]

Inherited from StackBasedClient[Req, Rep]

Inherited from Transformable[StackClient[Req, Rep]]

Inherited from Parameterized[This]

Inherited from Client[Req, Rep]

Inherited from AnyRef

Inherited from Any

Ungrouped