Package com.twitter.common.util

Interface Summary
BackoffStrategy Encapsulates a strategy for backing off from an operation that repeatedly fails.
Clock An abstraction of the system clock.
CommandExecutor Asynchronous executor of enqueued tasks in a rate limited manner.
Random An interface to define the common functionality that is required for generating random values.
 

Class Summary
BackoffDecider Handles logic for deciding whether to back off from calls to a backend.
BackoffDecider.Builder Builder class to configure a BackoffDecider.
BackoffHelper A utility for dealing with backoffs of retryable actions.
BuildInfo Handles loading of a build properties file, and provides keys to look up known values in the properties.
DateUtils Utilities for working with java Dates.
FileUtils Utilities for working with Files
KestrelConsumer Class responsible for pulling work items off of a kestrel queue.
ParsingUtil Common methods for parsing configs.
QueueDrainer<T extends Runnable> Joins a task queue with an executor service, to add control over when tasks are actually made available for execution.
Random.SystemRandom A Random that wraps a java.util.Random.
Random.Util  
RangeNormalizer Generic range normalizer class.
RateLimitedCommandExecutor CommandExecutor that invokes queueDrainer with a best-effort mechanism to execute with a fixed interval between requests of intervalBetweenRequests.
RetryingRunnable<E extends Exception> A runnable task that is retried in a user-configurable fashion.
Sampler A sampler that implements logic for fractional random selection.
StartWatch  
Stat This class is designed to provide basic statistics collection.
StateMachine<T> Represents a state machine that is not necessarily a Finite State Machine.
StateMachine.Builder<T> Builder to create a state machine.
StateMachine.Rule<T> A state and its allowed transitions (if any) and (optional) callback.
StateMachine.Rule.AllowedTransition<T> A helper class when building a transition rule, to define the allowed transitions.
StateMachine.Transition<T> Representation of a state transition.
Timer A utility for timing blocks of code.
TruncatedBinaryBackoff A BackoffStrategy that implements truncated binary exponential backoff.
 

Enum Summary
BackoffDecider.RecoveryType Different types of recovery mechanisms to use after exiting the backoff state.
BuildInfo.Key Values of keys that are expected to exist in the loaded properties file.
 

Exception Summary
BackoffHelper.BackoffStoppedException Occurs after the backoff strategy should stop.
StateMachine.IllegalStateTransitionException