Package

com.twitter.inject.thrift

modules

Permalink

package modules

Visibility
  1. Public
  2. All

Type Members

  1. abstract class FilteredThriftClientModule[FutureIface <: ThriftService, ServiceIface <: Filterable[ServiceIface]] extends TwitterModule with Implicits

    Permalink

    Provides a FutureIface in the form of RemoteService[Future] for making calls to a remote service.

    Provides a FutureIface in the form of RemoteService[Future] for making calls to a remote service. The FutureIface (e.g., RemoteService[Future]) wraps a ServiceIface in which each method is implemented in the form of a com.twitter.finagle.Service typed from com.twitter.scrooge.ThriftMethod.Args to com.twitter.scrooge.ThriftMethod.SuccessType.

    A FutureIface of RemoteService[Future] is used as this is the FutureIface type generated by Scrooge's "services-per-endpoint" functionality e.g. the result of calling Thrift.client.newMethodIface(...); as opposed to the functionally equivalent RemoteService.FutureIface.

    To provide per-method filters to the ServiceIface provide an implementation of filterServiceIface and use the provided com.twitter.inject.thrift.filters.ThriftClientFilterBuilder to filter methods. E.g.,

    serviceIface.copy( fetchBlob = filters.method(FetchBlob) .withMethodLatency .withExponentialRetry( shouldRetryResponse = PossiblyRetryableExceptions, start = 50.millis, multiplier = 2, retries = 3) .withRequestLatency .withRequestTimeout(500.millis) .withConcurrencyLimit( initialPermits = 100) .filtered(new MyFilter) .filtered[MyOtherFilter] .andThen(serviceIface.fetchBlob))

    See also

    Finagle Clients

    Services-per-endpoint in Scrooge

    com.twitter.finagle.thrift.MethodIfaceBuilder

  2. class ThriftClientIdModule extends TwitterModule

    Permalink
  3. abstract class ThriftClientModule[T] extends TwitterModule with Implicits

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 2016-06-23) Use the com.twitter.inject.thrift.modules.FilteredThriftClientModule

Value Members

  1. object AndThenServiceModule extends TwitterModule

    Permalink
  2. object FilteredThriftClientFlagsModule extends TwitterModule

    Permalink
  3. object FilteredThriftClientModule

    Permalink
  4. object ThriftClientIdModule extends ThriftClientIdModule

    Permalink

Ungrouped