package context
- Alphabetic
- Public
- Protected
Type Members
- trait Context extends AnyRef
A context contains a number of let-delimited bindings.
A context contains a number of let-delimited bindings. Bindings are indexed by type Key[A] in a typesafe manner. Later bindings shadow earlier ones.
Note that the implementation of context maintains all bindings in a linked list; context lookup requires a linear search.
- case class Deadline(timestamp: Time, deadline: Time) extends Ordered[Deadline] with Product with Serializable
A deadline is the time by which some action (e.g., a request) must complete.
A deadline is the time by which some action (e.g., a request) must complete. A deadline has a timestamp in addition to the deadline. This timestamp denotes the time at which the deadline was enacted.
This is done so that they may be reconciled over process boundaries; e.g., to account for variable latencies in message deliveries.
- timestamp
the time at which the deadline was enacted.
- deadline
the time by which the action must complete.
- final class LocalContext extends Context
A type of context that is local to the process.
A type of context that is local to the process. The type of Key is also unique (generative) to each instance of this context, so that keys cannot be used across different instances of this context type.
- final class MarshalledContext extends Context
A marshalled context contains bindings that may be marshalled and sent across process boundaries.
A marshalled context contains bindings that may be marshalled and sent across process boundaries. A set of marshalled bindings may be restored in the local environment. Thus we can use marshalled contexts to propagate a set of bindings across a whole request tree.
- sealed trait RemoteInfo extends AnyRef
Contains the remote information for a request, if available.
- case class Requeues(attempt: Int) extends Product with Serializable
Requeues contains the number of times a request has been requeued.
Requeues contains the number of times a request has been requeued.
- attempt
which retry attempt this is. Will be 0 if the request is not a requeue.
Value Members
- object BackupRequest
Used to signal that a request was initiated as a "backup request".
Used to signal that a request was initiated as a "backup request".
Note that these are broadcast across the rest of the request's call graph.
- See also
com.twitter.finagle.client.BackupRequestFilter for details on what a backup request is.
MethodBuilder's
idempotent
for configuring a client to use backups.
- object Contexts
com.twitter.finagle.context.Contexts that are managed by Finagle.
- object Deadline extends Key[Deadline] with Serializable
A broadcast context for deadlines.
- object RemoteInfo
- object Requeues extends Key[Requeues] with Serializable
Note: The context id is "c.t.f.Retries" and not "c.t.f.Requeues" because we have renamed the Retries context to Requeues (to reflect what it actually contains, which is the requeues), but we don't want to break existing users/deployments using this context by changing the key.