com.twitter

util

package util

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. util
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractClosable extends Closable

    Abstract Closable class for Java compatibility.

  2. abstract class AbstractCloseAwaitably extends AbstractClosable with Awaitable[BoxedUnit]

  3. abstract class AbstractEvent[T] extends Event[T]

    Abstract Event class for Java compatibility.

  4. abstract class AbstractVar[T] extends Var[T]

    Abstract Var class for Java compatibility.

  5. abstract class AbstractWitness[T] extends Witness[T]

    Abstract Witness class for Java compatibility.

  6. final class Activities extends AnyRef

  7. case class Activity[+T](run: Var[State[T]]) extends Product with Serializable

    An Activity is a handle to a concurrently running process, producing T-typed values.

  8. trait Awaitable[+T] extends AnyRef

    Wait for the result of some action.

  9. class Batcher[In, Out] extends (In) ⇒ Future[Out]

    Provides an interface for working with a batched com.twitter.util.Future

  10. class BoundedStack[A] extends Seq[A]

    A "stack" with a bounded size.

  11. trait Cancellable extends AnyRef

    Defines a trait that makes the underlying object *cancellable*.

  12. class CancellableSink extends Cancellable

  13. trait Closable extends AnyRef

    Closable is a mixin trait to describe a closable resource.

  14. final class Closables extends AnyRef

  15. trait CloseAwaitably extends CloseAwaitably0[Unit]

    A mixin to make an com.twitter.util.Awaitable out of a com.twitter.util.Closable.

  16. trait Codec[T, S] extends Bijection[T, S] with Encoder[T, S] with Decoder[T, S]

    A base trait for all Codecs that translate a type T into a serialized form S

  17. abstract class Command[-T1] extends (T1) ⇒ Unit

  18. class ConstFuture[A] extends Future[A]

    A Future that is already completed.

  19. class CountDownLatch extends AnyRef

  20. class Credentials extends AnyRef

    Java interface to Credentials.

  21. trait Decoder[T, S] extends AnyRef

    A base trait for decoders for type T from a serialized form S

  22. trait DecoderCompanion extends AnyRef

  23. trait Diff[CC[_], T] extends AnyRef

    A Diff stores the necessary instructions required to bring two version of a data structure into agreement.

  24. trait Diffable[CC[_]] extends AnyRef

    A type class that tells how to compute a Diff between two versions of a collection CC[T].

  25. trait Disposable[+T] extends AnyRef

    com.twitter.util.Disposable represents a live resource that must be disposed after use.

  26. class DoubleTrouble extends Exception

  27. sealed class Duration extends TimeLike[Duration] with Serializable

    A Duration represents the span between two points in time.

  28. trait Encoder[T, S] extends (T) ⇒ S

    A base trait for encoders of type T into a serialized form S

  29. trait EncoderCompanion extends AnyRef

  30. trait Event[+T] extends AnyRef

    Events are instantaneous values, defined only at particular instants in time (cf.

  31. final class Events extends AnyRef

  32. abstract class ExceptionalFunction[-T1, +R] extends Function[T1, R]

  33. abstract class ExceptionalFunction0[+R] extends Function0[R]

  34. class ExecutorServiceFuturePool extends FuturePool

    A FuturePool implementation backed by an java.util.concurrent.ExecutorService.

  35. trait Extractable[T] extends AnyRef

  36. abstract class FactoryPool[A] extends Pool[A]

  37. abstract class Function[-T1, +R] extends PartialFunction[T1, R]

    This class is for Java friendliness.

  38. abstract class Function0[+R] extends () ⇒ R

  39. abstract class Function2[-T1, -T2, +R] extends (T1, T2) ⇒ R

  40. abstract class Future[+A] extends Awaitable[A]

    A computation evaluated asynchronously.

  41. class FutureCancelledException extends Exception

  42. trait FutureEventListener[T] extends AnyRef

    An alternative interface for handling Future Events.

  43. class FutureNonLocalReturnControl extends Exception

  44. trait FuturePool extends AnyRef

    A FuturePool executes tasks asynchronously, typically using a pool of worker threads.

  45. class FuturePools extends AnyRef

  46. class FutureTask[A] extends Promise[A] with Runnable

  47. abstract class FutureTransformer[-A, +B] extends AnyRef

    An alternative interface for performing Future transformations; that is, converting a Future[A] to a Future[B].

  48. class InterruptibleExecutorServiceFuturePool extends ExecutorServiceFuturePool

    A FuturePool backed by a java.util.concurrent.ExecutorService that supports cancellation.

  49. trait JavaSingleton extends AnyRef

    A mixin to allow scala objects to be used from java.

  50. class JavaTimer extends Timer

    A Timer that is implemented via a java.util.Timer.

  51. class LastWriteWinsQueue[A] extends Queue[A]

    An implementation of java.

  52. final class Local[T] extends AnyRef

    A Local is a ThreadLocal whose scope is flexible.

  53. trait Managed[+T] extends AnyRef

    Managed[T] is a resource of type T which lifetime is explicitly managed.

  54. class MockTimer extends Timer

    Exceedingly useful for writing well-behaved tests that need control over a Timer.

  55. trait Monitor extends AnyRef

    A Monitor is a composable exception handler.

  56. case class MonitorException(handlingExc: Throwable, monitorExc: Throwable) extends Exception with Product with Serializable

    Wraps an exception that happens when handling another exception in a monitor.

  57. class NoFuture extends Future[Nothing]

    A future with no future (never completes).

  58. trait NoStacktrace extends Exception

  59. class NullTimer extends Timer

    A NullTimer is not a timer at all: it invokes all tasks immediately and inline.

  60. trait Pool[A] extends AnyRef

  61. class Promise[A] extends Future[A] with Responder[A] with Updatable[Try[A]]

    A writeable com.twitter.util.Future that supports merging.

  62. class ReadWriteVar[T] extends UpdatableVar[T]

    Java adaptation of Var[T] with Updatable[T] with Extractable[T].

  63. trait ReferenceCountedTimer extends Timer

  64. class ReferenceCountingTimer extends ReferenceCountedTimer

  65. final case class Return[+R](r: R) extends Try[R] with Product with Serializable

  66. class RichU64ByteArray extends AnyRef

  67. class RichU64Long extends AnyRef

  68. class RichU64String extends AnyRef

    RichU64String parses string as a 64-bit unsigned hexadecimal long, outputting a signed Long or a byte array.

  69. class ScheduledThreadPoolTimer extends Timer

  70. trait SignalHandler extends AnyRef

  71. class SimplePool[A] extends Pool[A]

  72. trait StateMachine extends AnyRef

  73. trait Stopwatch extends AnyRef

    A stopwatch may be used to measure elapsed time.

  74. class StorageUnit extends Ordered[StorageUnit]

    Representation of storage units.

  75. class SunSignalHandler extends SignalHandler

  76. trait TempFolder extends AnyRef

    Test mixin that creates a temporary thread-local folder for a block of code to execute in.

  77. class ThreadStoppingTimer extends Timer

  78. final case class Throw[+R](e: Throwable) extends Try[R] with Product with Serializable

  79. sealed class Time extends TimeLike[Time] with Serializable

    An absolute point in time, represented as the number of nanoseconds since the Unix epoch.

  80. trait TimeControl extends AnyRef

  81. class TimeFormat extends AnyRef

    A thread-safe wrapper around a SimpleDateFormat object.

  82. trait TimeLike[This <: TimeLike[This]] extends Ordered[This]

    A common trait for time-like values.

  83. trait TimeLikeOps[This <: TimeLike[This]] extends AnyRef

  84. class TimeoutException extends java.util.concurrent.TimeoutException

  85. trait Timer extends AnyRef

    Timers are used to schedule tasks in the future.

  86. trait TimerTask extends Closable

    TimerTasks represent pending tasks scheduled by a Timer.

  87. abstract class TokenBucket extends AnyRef

    A token bucket is used to control the relative rates of two processes: one fills the bucket, another empties it.

  88. sealed abstract class Try[+R] extends AnyRef

    This class represents a computation that can succeed or fail.

  89. trait Updatable[T] extends AnyRef

    Denotes an updatable container.

  90. trait Var[+T] extends AnyRef

    Trait Var represents a variable.

  91. final class Vars extends AnyRef

  92. trait Witness[-N] extends AnyRef

    A witness is the recipient of Event.

  93. class WitnessedEvent[T] extends Event[T] with Witness[T]

    A Java analog of Event[A]().

  94. final class Witnesses extends AnyRef

  95. trait Bijection[A, B] extends (A) ⇒ B

    A bijection is a function for which every value in its codomain (set of all possible results) is equivalent to application of the function on a unique value in its domain (all possible inputs).

  96. trait Config[T] extends () ⇒ T

    A config object contains vars for configuring an object of type T, and an apply() method which turns this config into an object of type T.

  97. class LongOverflowException extends Exception

    Annotations
    @deprecated
    Deprecated

    (Since version 2015-11-16) Use Java's java.lang.ArithmeticException instead

  98. class RingBuffer[A] extends Seq[A]

    Annotations
    @deprecated
    Deprecated

    (Since version 2014-10-11) Use com.google.common.collect.EvictingQueue instead

Value Members

  1. object Activity extends Serializable

    Note: There is a Java-friendly API for this object: com.twitter.util.Activities.

  2. object Await

    Synchronously await the result of some action by blocking the current thread.

  3. object Awaitable

  4. object Base64Long

    Efficient conversion of Longs to base 64 encoded strings.

  5. object BinaryCodec

  6. object Cancellable

  7. object Closable

    Note: There is a Java-friendly API for this object: com.twitter.util.Closables.

  8. object Codec extends EncoderCompanion with DecoderCompanion

  9. object Credentials

    Simple helper to read authentication credentials from a text file.

  10. object Decoder extends DecoderCompanion

  11. object Diffable

    Diffable defines common type class instances for Diffable.

  12. object Disposable

  13. object Duration extends TimeLikeOps[Duration] with Serializable

  14. object Encoder extends EncoderCompanion

  15. object Event

    Note: There is a Java-friendly API for this object: com.twitter.util.Events.

  16. object Function

  17. object Future

  18. object FuturePool

    Note: There is a Java-friendly API for this object: com.twitter.util.FuturePools.

  19. object FutureTask

  20. object Futures

    Twitter Future utility methods for ease of use from java

  21. object HandleSignal

  22. object Local

  23. object LongOverflowArith

  24. object Managed

  25. object Memoize

  26. object Monitor extends Monitor

    Defines the (Future)-Local monitor as well as some monitor utilities.

  27. object NetUtil

  28. object NilStopwatch extends Stopwatch

    A trivial implementation of Stopwatch for use as a null object.

  29. object NoStacktrace extends Serializable

  30. object NonFatal

    A classifier of fatal exceptions

  31. object NullMonitor extends Monitor

    A monitor that always fails to handle an exception.

  32. object NullTimerTask extends TimerTask

  33. object Promise

  34. object RandomSocket

    A generator of random local java.net.InetSocketAddress objects with ephemeral ports.

  35. object Return extends Serializable

  36. object RootMonitor extends Monitor

  37. object SignalHandlerFactory

  38. object StateMachine

  39. object Stopwatch extends Stopwatch

    The system Stopwatch measures elapsed time using System.nanoTime.

  40. object StorageUnit

  41. val StorageUnitConversions: storage.type

  42. object SunSignalHandler

  43. object Throw extends Serializable

  44. object Throwables

  45. object Time extends TimeLikeOps[Time] with Serializable

    By using Time.now in your program instead of System.currentTimeMillis unit tests are able to adjust the current time to verify timeouts and other time-dependent behavior, without calling sleep, and providing deterministic tests.

  46. val TimeConversions: time.type

  47. object Timer

  48. object TokenBucket

  49. object Try

    The Try type represents a computation that may either result in an exception or return a success value.

  50. object TwitterDateFormat

    A java.text.SimpleDateFormat that avoids confusion between YYYY and yyyy.

  51. object U64

  52. object Unsafe

  53. object Updatable

  54. object Var

    Note: There is a Java-friendly API for this object: com.twitter.util.Vars.

  55. object Witness

    Note: There is Java-friendly API for this object: com.twitter.util.Witnesses.

  56. package javainterop

Deprecated Value Members

  1. object Bijection

    Annotations
    @deprecated
    Deprecated

    (Since version 6.17.1) Prefer using com.twitter.bijection.Bijection

  2. object Config

    You can import Config.

Inherited from AnyRef

Inherited from Any

Ungrouped