- By Inheritance
- Hide All
- Show All
- package addr
- package builder
- package client
- package context
- package core
- package dispatch
- package exp
Package exp contains experimental code.
- package factory
- package filter
- package http
- package http2
- package liveness
- package loadbalancer
This package implements client side load balancing algorithms.
- package logging
- package memcached
- package mux
Package mux implements a generic RPC multiplexer with a rich protocol.
- package mysql
- package namer
- package naming
- package netty4
Package netty4 implements the bottom finagle primitives: com.twitter.finagle.Server and a client transport in terms of the netty4 event loop.
- package offload
- package param
Defines common com.twitter.finagle.Stack.Param's shared between finagle clients and servers.
- package partitioning
- package pool
- package postgresql
- package pushsession
- package redis
- package scribe
- package server
- package serverset2
- package service
- package ssl
- package stats
- package thrift
Please use the new interface, com.twitter.finagle.Thrift, for constructing Thrift clients and servers.
- package thriftmux
- package toggle
- package tracing
- package transport
- package tunable
- package util
- package zipkin
- package zookeeper
- abstract class AbstractFailureFlags[T <: AbstractFailureFlags[T]] extends Exception with FailureFlags[T]
For Java users wanting to implement exceptions that are FailureFlags.
- abstract class AbstractNamer extends Namer
Abstract Namer class for Java compatibility.
- abstract class AbstractResolver extends Resolver
An abstract class version of Resolver for java compatibility.
- sealed trait Addr extends AnyRef
An address identifies the location of an object--it is a bound name.
- sealed trait Address extends AnyRef
An Address represents the physical location of a single host or endpoint.
- trait Announcement extends Closable
- trait Announcer extends AnyRef
- class AnnouncerForumInvalid extends Exception
Indicates that a forum string passed to an com.twitter.finagle.Announcer was invalid according to the forum grammar .
- class AnnouncerNotFoundException extends Exception
Indicates that an com.twitter.finagle.Announcer was not found for the given
- class ApiException extends Exception
A base class for exceptions encountered on account of incorrect API usage.
- sealed abstract class Backoff extends AnyRef
A recursive ADT to define various backoff strategies, where
durationreturns the current backoff, and
nextreturns a new Backoff.
A new Backoff will be created only when,
None of the Backoffs are memoized, for strategies that involve randomness (,
ExponentialJittered), there is no way to foresee the next backoff value.
All Backoffs are infinite unless using take(Int) to create a strategy with limited number of iterations.,
You can combine one or more Backoffs with take(Int) and concat(Backoff).,
If the backoff returned from any Backoffs overflowed, all succeeding backoffs will be Duration.Top.
- trait CanStackFrom[-From, To] extends AnyRef
A typeclass for "stackable" items.
- class CancelledConnectionException extends RequestException with HasLogLevel
A Future is satisfied with this exception when the process of establishing a session is interrupted.
- See also
The user guide for additional details.
- class CancelledRequestException extends RequestException with HasLogLevel
Indicates that a request was cancelled.
- See also
The user guide for additional details.
- class ChannelBufferUsageException extends Exception
Indicates that an error occurred on account of incorrect usage of a
- class ChannelClosedException extends ChannelException with FailureFlags[ChannelClosedException]
Indicates that a given channel was closed, for instance if the connection was reset by a peer or a proxy.
- class ChannelException extends Exception with SourcedException with HasLogLevel
An exception encountered within the context of a given socket channel.
- case class ChannelWriteException(ex: Option[Throwable]) extends ChannelException with WriteException with NoStackTrace with Product with Serializable
Default implementation for WriteException that wraps an underlying exception.
- trait Client[Req, Rep] extends AnyRef
RPC clients with
Req-typed requests and
- trait ClientConnection extends Closable
Information about a client, passed to a ServiceFactory for each new connection.
this is represented by ClientConnection.nil on the client side when it initiates a new connection.
- abstract class ClientParamsInjector extends ParamsInjector
ClientsParamsInjector is the standard mechanism for injecting params into the client.
- class ConnectionFailedException extends ChannelException
Indicates that the client failed to establish a connection.
- case class ConnectionRefusedException(remoteAddr: Option[SocketAddress]) extends ChannelException with Product with Serializable
Indicates that connecting to a given
- case class Dentry(prefix: Prefix, dst: NameTree[Path]) extends Product with Serializable
Trait Dentry describes a delegation table entry.
- class DroppedWriteException extends TransportException
Indicates that a com.twitter.finagle.transport.Transport write associated with the request was dropped by the transport (usually to respect backpressure).
- case class Dtab(dentries0: IndexedSeq[Dentry]) extends DtabBase with Product with Serializable
A Dtab--short for delegation table--comprises a sequence of delegation rules.
- final class DtabBuilder extends ReusableBuilder[Dentry, Dtab]
- trait DtabFlags extends AnyRef
- class FactoryToService[Req, Rep] extends Service[Req, Rep]
- class FailedFastException extends RequestException with WriteException with HasLogLevel with FailureFlags[FailedFastException]
Used by com.twitter.finagle.service.FailFastFactory to indicate that a request failed because all hosts in the cluster to which the client is connected have been marked as failed.
- See also
The user guide for additional details.
- final class Failure extends Exception with NoStackTrace with HasLogLevel with FailureFlags[Failure]
Base exception for all Finagle originated failures.
- trait FailureFlags[T <: FailureFlags[T]] extends Exception
Carries metadata for exceptions such as whether or not the exception is safe to retry.
- See also
AbstractFailureFlags for creating subclasses in Java.
- abstract class Filter[-ReqIn, +RepOut, +ReqOut, -RepIn] extends (ReqIn, Service[ReqOut, RepIn]) => Future[RepOut]
- See also
The user guide for details and examples.
- trait FinagleInit extends () => Unit
Initialization code to run before
Finaglebootstraps any resources (such as its scheduler).
There are *no* relative ordering guarantees if multiple
MetricsInitinstances are registered.
- class GlobalRequestTimeoutException extends RequestTimeoutException
Indicates that a request timed out, where "request" comprises a full RPC from the perspective of the application.
- trait HasRemoteInfo extends Exception
A trait for exceptions that contain remote information: the downstream address/client id, upstream address/client id (if applicable), and trace id of the request.
- trait HttpRichClient extends AnyRef
A rich HTTP/1.1 client with a *very* basic URL fetcher.
- class InconsistentStateException extends ChannelException
Indicates that some client state was inconsistent with the observed state of some server.
- class IndividualRequestTimeoutException extends RequestTimeoutException
Indicates that a single Finagle-level request timed out.
- final class JavaFailureFlags extends AnyRef
Java compatibility for the
- trait ListeningServer extends ClosableOnce with Awaitable[Unit]
Trait ListeningServer represents a bound and listening server.
- trait MemcachedRichClient extends AnyRef
Factory methods to build a finagle-memcached client.
- class MultipleAnnouncersPerSchemeException extends Exception with NoStackTrace
Indicates that multiple Announcers were discovered for given
- class MultipleResolversPerSchemeException extends Exception with NoStackTrace
Indicates that multiple Resolvers were discovered for given
- trait MysqlRichClient extends AnyRef
Supplements a com.twitter.finagle.Client with convenient builder methods for constructing a mysql client.
- sealed trait Name extends AnyRef
Names identify network locations.
- sealed trait NameTree[+T] extends AnyRef
Name trees represent a composite T-typed name whose interpretation is subject to evaluation rules.
- abstract class Namer extends AnyRef
A namer is a context in which a NameTree is bound.
- class NoBrokersAvailableException extends RequestException with SourcedException
Indicates that a request failed because no servers were available.
- class NotServableException extends RequestException
Indicates that the request was not servable, according to some policy.
- case class Path(elems: Buf*) extends Product with Serializable
A Path comprises a sequence of byte buffers naming a hierarchically-addressed object.
- trait ProxyAnnouncement extends Announcement with Proxy
- class ProxyConnectException extends Exception with NoStackTrace with FailureFlags[ProxyConnectException]
Indicates that either SOCKS or HTTP(S) proxy server rejected client's connect request.
- class ReadTimedOutException extends ChannelException
Indicates that a read from a given
- trait RedisRichClient extends AnyRef
- case class RefusedByRateLimiter() extends ChannelException with Product with Serializable
Indicates that requests were failed by a rate-limiter.
- class RequestException extends Exception with NoStackTrace with SourcedException
A base class for request failures.
- class RequestTimeoutException extends RequestException with TimeoutException
Indicates that a request timed out.
- trait Resolver extends AnyRef
A resolver binds a name, represented by a string, to a variable address.
- class ResolverAddressInvalid extends Exception
Indicates that a destination name string passed to a com.twitter.finagle.Resolver was invalid according to the destination name grammar .
- class ResolverNotFoundException extends Exception
Indicates that a com.twitter.finagle.Resolver was not found for the given
- trait Server[Req, Rep] extends AnyRef
Servers implement RPC servers with
Req-typed requests and
- case class ServerErrorMonitor(suppressedCodes: Seq[Short]) extends Monitor with Product with Serializable
ServerErrorMonitor is a com.twitter.util.Monitor that specifically handles mysql ServerErrors in a less verbose way then com.twitter.finagle.util.DefaultMonitor.
val client = Mysql.client .withMonitor(ServerErrorMonitor(Seq(<code>)))
- abstract class Service[-Req, +Rep] extends (Req) => Future[Rep] with Closable
Serviceis an asynchronous function from a
- class ServiceClosedException extends Exception with ServiceException with FailureFlags[ServiceClosedException]
Indicates that a request was applied to a com.twitter.finagle.Service that is closed (i.e.
- trait ServiceException extends Exception with SourcedException
A trait for exceptions related to a com.twitter.finagle.Service.
- abstract class ServiceFactory[-Req, +Rep] extends (ClientConnection) => Future[Service[Req, Rep]] with Closable
- abstract class ServiceFactoryProxy[-Req, +Rep] extends ServiceFactory[Req, Rep]
A ServiceFactory that proxies all calls to another ServiceFactory.
- trait ServiceFactoryWrapper extends AnyRef
A ServiceFactoryWrapper adds behavior to an underlying ServiceFactory.
- trait ServiceNamer[Req, Rep] extends Namer
Base-trait for Namers that bind to a local Service.
- class ServiceNotAvailableException extends Exception with ServiceException
Indicates that a request was applied to a com.twitter.finagle.Service that is unavailable.
- abstract class ServiceProxy[-Req, +Rep] extends Service[Req, Rep] with Proxy
A simple proxy Service that forwards all calls to another Service.
- class ServiceReturnedToPoolException extends IllegalStateException with ServiceException with HasLogLevel with FailureFlags[ServiceReturnedToPoolException]
Indicates that this service was closed and returned to the underlying pool.
- class ServiceTimeoutException extends Exception with WriteException with ServiceException with TimeoutException with NoStackTrace
Indicates that the connection was not established within the timeouts.
- class ShardNotAvailableException extends NotServableException
Indicates that the shard to which a request was assigned was not available.
- abstract class SimpleFilter[Req, Rep] extends Filter[Req, Rep, Req, Rep]
A Filter where the request and reply types are the same.
- trait SourcedException extends Exception with HasRemoteInfo
A trait for exceptions that have a source.
- class SslException extends ChannelException
Indicates that an SSL/TLS exception occurred.
- case class SslVerificationFailedException(ex: Option[Throwable], remoteAddr: Option[SocketAddress]) extends SslException with Product with Serializable
Indicates that an error occurred while
SslClientSessionVerificationwas being performed, or the server disconnected from the client in a way that indicates that there was high probability that the server failed to verify the client's certificate.
- sealed trait Stack[T] extends AnyRef
Stacks represent stackable elements of type T.
- class StackBuilder[T] extends AnyRef
StackBuilders are imperative-style builders for Stacks.
- abstract class StackTransformer extends Transformer
StackTransformer is a standard mechanism for transforming the default shape of the Stack.
- abstract class StackTransformerCollection extends AnyRef
A TransformerCollection is a collection of transformers which are typically used globally by a stack.
- trait Stackable[T] extends Head
Produce a stack from a
- final class Stacks extends AnyRef
A Java adaptation of the
- sealed trait Status extends AnyRef
Status tells the condition of a networked endpoint.
- abstract class StreamClosedException extends ChannelException with FailureFlags[StreamClosedException] with NoStackTrace
Indicates that a given stream was closed, for instance if the stream was reset by a peer or a proxy.
- trait TimeoutException extends Exception with SourcedException with HasLogLevel
Indicates that an operation exceeded some timeout duration before completing.
- class TooManyConcurrentRequestsException extends ApiException
Indicates that the client has issued more concurrent requests than are allowable, where "allowable" is typically determined based on some configurable maximum.
- class TooManyWaitersException extends RequestException with HasLogLevel
Used by com.twitter.finagle.pool.WatermarkPool to indicate that a request failed because too many requests are already waiting for a connection to become available from a client's connection pool.
- class TransportException extends Exception with SourcedException
A base class for exceptions encountered in the context of a com.twitter.finagle.transport.Transport.
- case class UnknownChannelException(ex: Option[Throwable], remoteAddr: Option[SocketAddress]) extends ChannelException with Product with Serializable
A catch-all exception class for uncategorized ChannelExceptions.
- trait WriteException extends Exception with SourcedException
Marker trait to indicate there was an exception before writing any of the request.
- class WriteTimedOutException extends ChannelException
Indicates that a write to a given
- object Addr
Note: There is a Java-friendly API for this object: com.twitter.finagle.Addrs.
- object Address
- object Addresses
A Java adaptation of the com.twitter.finagle.Address companion object.
- object Addrs
A Java adaptation of the com.twitter.finagle.Addr companion object.
- object Announcer
- object Backoff
- object CanStackFrom
- object ChannelException extends Serializable
- object ChannelWriteException extends Serializable
- object ClientConnection
- object Dentry extends Serializable
- object Dtab extends DtabCompanionBase with Serializable
- object FactoryToService
- object FailResolver extends Resolver
- object Failure extends Serializable
- object FailureFlags extends Serializable
FailureFlagsmay be applied to any Failure/Exception encountered during the handling of a request.
- See also
JavaFailureFlagsfor Java compatibility.
- object Filter
- object FixedInetResolver
InetResolver that caches all successful DNS lookups indefinitely and does not poll for updates.
- object Http extends Client[Request, Response] with HttpRichClient with Server[Request, Response]
HTTP/1.1 protocol support, including client and server.
- object InetResolver
Resolver for inet scheme.
- object Memcached extends Client[Command, Response] with Server[Command, Response]
Stack based Memcached client.
val client = Memcached.newRichClient(dest)
If you want to provide more finely tuned configurations:,
val client = Memcached.client .withEjectFailedHost(true) .withTransport.connectTimeout(100.milliseconds)) .withRequestTimeout(10.seconds) .withSession.acquisitionTimeout(20.seconds) .newRichClient(dest, "memcached_client")
- object Mux extends Client[Request, Response] with Server[Request, Response]
A client and server for the mux protocol described in com.twitter.finagle.mux.
- object Mysql extends Client[Request, Result] with MysqlRichClient
val client = Mysql.client .withCredentials("<username>", "<password>") .withDatabase("<db>") .newRichClient("inet!localhost:3306")
- object Name
See Names for Java compatibility APIs.
- object NameTree
The NameTree object comprises NameTree types as well as binding and evaluation routines.
- object Namer
- object Names
Java compatibility APIs for Name.
- object NegResolver extends Resolver
- object NilResolver extends Resolver
- object NullServer extends ListeningServer
An empty ListeningServer that can be used as a placeholder.
- object Path extends Serializable
- object PostgreSql
- object Redis extends Client[Command, Reply] with RedisRichClient
- object Resolver extends BaseResolver
The default Resolver used by Finagle.
- See also
Resolvers for Java support.
- object Resolvers
Java APIs for Resolver.
- object Service
- object ServiceFactory
- object ServiceFactoryWrapper
- object SourcedException extends Serializable
- object Stack
- object StackParams
Stack.Paramsforwarder to provide a clean Java API.
- object Status
Define valid Status! values.
- object Thrift extends Client[ThriftClientRequest, Array[Byte]] with Server[Array[Byte], Array[Byte]]
Client and server for Apache Thrift.
- object ThriftMux extends Client[ThriftClientRequest, Array[Byte]] with Server[Array[Byte], Array[Byte]]
ThriftMuxobject is both a
com.twitter.finagle.Serverfor the Thrift protocol served over com.twitter.finagle.mux.
- object WriteException extends Serializable
- object stack