This method allows for extended configuration of the base MethodBuilder (e.g., the MethodBuilder used as a starting point for all method configurations) not exposed by this module or for overriding provided defaults, e.g.,
This method allows for extended configuration of the base MethodBuilder (e.g., the MethodBuilder used as a starting point for all method configurations) not exposed by this module or for overriding provided defaults, e.g.,
override def configureMethodBuilder(methodBuilder: thriftmux.MethodBuilder): thriftmux.MethodBuilder = { methodBuilder .withTimeoutTotal(5.seconds) }
Note: any configuration here will be applied to all methods unless explicitly overridden. However, also note that filters are cumulative. Thus filters added here will be present in any final configuration.
the thriftmux.MethodBuilder to configure.
a configured MethodBuilder which will be used as the starting point for any per-method configuration.
Configure the ServicePerEndpoint.
Configure the ServicePerEndpoint. This is done by using the given ThriftMethodBuilderFactory to configure a com.twitter.inject.thrift.ThriftMethodBuilder for a given ThriftMethod. E.g.,
servicePerEndpoint .withFetchBlob( builder.method(FetchBlob) ...
Subclasses of this module MAY provide an implementation of configureServicePerEndpoint
which
specifies configuration of a ServicePerEndpoint
interface per-method of the interface.
a ThriftMethodBuilderFactory for creating a com.twitter.inject.thrift.ThriftMethodBuilder.
the ServicePerEndpoint to configure.
a per-method filtered ServicePerEndpoint
This method allows for further configuration of the ThriftMux client for parameters not exposed by this module or for overriding defaults provided herein, e.g.,
This method allows for further configuration of the ThriftMux client for parameters not exposed by this module or for overriding defaults provided herein, e.g.,
override def configureThriftMuxClient(client: ThriftMux.Client): ThriftMux.Client = { client .withProtocolFactory(myCustomProtocolFactory)) .withStatsReceiver(someOtherScopedStatsReceiver) .withMonitor(myAwesomeMonitor) .withTracer(notTheDefaultTracer) .withResponseClassifier(ThriftResponseClassifier.ThriftExceptionsAsFailures) }
the com.twitter.finagle.ThriftMux.Client to configure.
a configured ThriftMux.Client.
Function to add a user-defined Monitor.
Function to add a user-defined Monitor. A com.twitter.finagle.util.DefaultMonitor will be installed implicitly which handles all exceptions caught in the stack. Exceptions that are not handled by a user-defined monitor are propagated to the com.twitter.finagle.util.DefaultMonitor.
NullMonitor has no influence on DefaultMonitor behavior here.
Configures a "global" request timeout
on the ThriftMux client (default: unbounded).
Configures a "global" request timeout
on the ThriftMux client (default: unbounded).
This will set *all* requests to *every* method to have the same total timeout.
a Duration which represents the total request timeout
https://twitter.github.io/finagle/guide/Clients.html#timeouts-expiration
com.twitter.finagle.param.CommonParams.withRequestTimeout
Default com.twitter.finagle.service.RetryBudget.
Default com.twitter.finagle.service.RetryBudget. It is highly recommended that budgets be shared between all filters that retry or re-queue requests to prevent retry storms.
a default com.twitter.finagle.service.RetryBudget
https://twitter.github.io/finagle/guide/Clients.html#retries
Configures the session acquisition timeout
of this client (default: unbounded).
Configures the session acquisition timeout
of this client (default: unbounded).
a Duration which represents the acquisition timeout
https://twitter.github.io/finagle/guide/Clients.html#timeouts-expiration
com.twitter.finagle.param.ClientSessionParams.acquisitionTimeout
A TwitterModule which allows for configuration of a
ThriftMux
client. The client interface can be expressed as aservice-per-endpoint
or aMethodPerEndpoint
.Provides bindings for a Scrooge-generated
service-per-endpoint
andMethodPerEndpoint
. TheMethodPerEndpoint
is constructed via the MethodPerEndpointBuilder and is thus implemented as a thin wrapper over theservice-per-endpoint
.This TwitterModule allows users to configure and filter a Scrooge-generated
service-per-endpoint
per-method which can then be used directly or can be wrapped by aMethodPerEndpoint
.A Scrooge-generated ServicePerEndpoint
A Scrooge-generated MethodPerEndpoint
This TwitterModule expects a com.twitter.finagle.thrift.ClientId to be bound to the object graph but does not assume how it is done. A com.twitter.finagle.thrift.ClientId can be bound by including the ThriftClientIdModule in your server configuration.
,When applying filters, filter order matters. The order in which filters are applied is the order in which requests will flow through to the service and the opposite of the order in which responses return. See the ThriftMethodBuilderFactory for more information.
What is ThriftMux?
Finagle Clients
ReqRepServicePerEndpoint
ServicePerEndpoint
MethodPerEndpoint