Packages

package util

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. util
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class AsyncLatch extends AnyRef

    A construct providing latched, asynchronous execution of side-effecting functions.

    A construct providing latched, asynchronous execution of side-effecting functions. com.twitter.finagle.util.AsyncLatch#await does not block, but the execution of functions passed to it may be delayed. That is, because the latch guarantees serial, non-concurrent execution, functions passed to await may have to wait until both of the following conditions are met:

    1. No other functions are being executed 2. The latch's count is zero

    Thus, calling com.twitter.finagle.util.AsyncLatch#incr will cause subsequent functions passed to com.twitter.finagle.util.AsyncLatch#await to be delayed until the count is decremented to zero. Once the count is zero, functions are executed in LIFO order, i.e., the reverse of the order in which they are given to await.

  2. trait Chan[-T] extends AnyRef
  3. trait CloseNotifier extends AnyRef

    Allows resources to register their handlers to be invoked when service is closing.

  4. trait Drv extends (Rng) ⇒ Int
  5. trait Proc[-T] extends Chan[T]

    A Proc is a process that can receive messages.

    A Proc is a process that can receive messages. Procs guarantee that exactly one message is delivered at a time, and that they are delivered in the order received.

    They can be thought of as featherweight actors.

  6. trait ReporterFactory extends (String, Option[SocketAddress]) ⇒ Monitor
  7. trait Rng extends AnyRef

    A random number generator.

    A random number generator. Java's divergent interfaces forces our hand here: ThreadLocalRandom does not conform to java.util.Random. We bridge this gap.

  8. trait Showable[-T] extends AnyRef

    Trait showable is a type-class for showing parseable representations of objects.

  9. trait StackRegistry extends AnyRef

    A registry that allows the registration of a string identifier with a a com.twitter.finagle.Stack and its params.

    A registry that allows the registration of a string identifier with a a com.twitter.finagle.Stack and its params. This is especially useful in keeping a process global registry of Finagle clients and servers for dynamic introspection.

  10. class WindowedPercentileHistogram extends Closable

    Sliding window of numBuckets histograms.

    Sliding window of numBuckets histograms. Each bucket covers a bucketSize interval and must be full before being counted in percentile.

Value Members

  1. val DefaultLogger: Logger
  2. object ByteArrays
  3. object CloseNotifier
  4. object DefaultTimer extends ProxyTimer

    Finagle's default Timer that's intended to be shared across a number of servers/clients.

    Finagle's default Timer that's intended to be shared across a number of servers/clients.

    The default Timer is intended for scheduling tasks that will finish very quickly and shouldn't be used to schedule tasks that will occupy the executing thread for a significant duration.

    Use DefaultTimer.Implicit to import an implicit instance of this timer into the scope.

    scala> import com.twitter.util.Future, com.twitter.conversions.DurationOps._
    scala> import com.twitter.finagle.util.DefaultTimer.Implicit
    
    scala> val f = Future.sleep(10.seconds)
    f: com.twitter.util.Future[Unit] = <function0>

    Java users may prefer DefaultTimer.getInstance() to access this timer.

    Note

    This timer is "unstoppable" such that calls to stop() is ignored.

  5. object Drv

    Create discrete random variables representing arbitrary distributions.

  6. object ExitGuard

    ExitGuard prevents the process from exiting normally by use of a nondaemon thread whenever there is at least one guarder.

  7. object InetSocketAddressUtil
  8. object LoadService

    Load a singleton class in the manner of java.util.ServiceLoader.

    Load a singleton class in the manner of java.util.ServiceLoader. It is more resilient to varying Java packaging configurations than ServiceLoader.

    See also

    com.twitter.app.LoadService in util-app

  9. object LoadedReporterFactory extends ReporterFactory
  10. object NullReporterFactory extends ReporterFactory
  11. object Proc
  12. object Rng

    See Rngs for Java compatible APIs.

  13. object Rngs

    Java compatible forwarders.

  14. object Showable
  15. object StackRegistry
  16. object WindowedPercentileHistogram
  17. object defaultTimerProbeSlowTasks extends GlobalFlag[Boolean]

    Configures whether to probe for slow tasks executing in the default Timer.

    Configures whether to probe for slow tasks executing in the default Timer.

    When enabled, tasks are monitored to detect tasks that are slow to complete. A counter of the number of slow tasks is registered at finagle/timer/slow. Additionally, if a slow task is observed executing the stack traces of all threads will be logged at level WARN. The maximum runtime and minimum interval between logging stack traces can be tuned using the global flags c.t.f.u.defaultTimerSlowTaskMaxRuntime and c.t.f.u.defaultTimerSlowTaskLogMinInterval, defined below.

    Note

    Observation of a slow task in progress is performed when scheduling additional work and is thus susceptible to false negatives.

  18. object defaultTimerSlowTaskLogMinInterval extends GlobalFlag[Duration]

    Configures the minimum duration between logging stack traces when a slow task is detected in the default Timer.

  19. object defaultTimerSlowTaskMaxRuntime extends GlobalFlag[Duration]

    Configures the maximum allowed runtime for tasks executing in the default Timer.

Inherited from AnyRef

Inherited from Any

Ungrouped