com.twitter

util

package util

Linear Supertypes
AnyRef, Any
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 BoundedStack[A] extends Seq[A]

    A "stack" with a bounded size.

  10. trait Cancellable extends AnyRef

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

  11. class CancellableSink extends Cancellable

  12. trait Closable extends AnyRef

    Closable is a mixin trait to describe a closable resource.

  13. final class Closables extends AnyRef

  14. trait CloseAwaitably extends Awaitable[Unit]

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

  15. 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

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

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

    A Future that is already completed.

  18. class CountDownLatch extends AnyRef

  19. class Credentials extends AnyRef

    Java interface to Credentials.

  20. trait Decoder[T, S] extends AnyRef

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

  21. trait DecoderCompanion extends AnyRef

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

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

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

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

  24. trait Disposable[+T] extends AnyRef

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

  25. class DoubleTrouble extends Exception

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

    A Duration represents the span between two points in time.

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

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

  28. trait EncoderCompanion extends AnyRef

  29. trait Event[+T] extends AnyRef

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

  30. final class Events extends AnyRef

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

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

  33. class ExecutorServiceFuturePool extends FuturePool

    A FuturePool implementation backed by an ExecutorService.

  34. trait Extractable[T] extends AnyRef

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

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

    This class is for Java friendliness.

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

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

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

    A computation evaluated asynchronously.

  40. class FutureCancelledException extends Exception

  41. trait FutureEventListener[T] extends AnyRef

    An alternative interface for handling Future Events.

  42. class FutureNonLocalReturnControl extends Exception

  43. trait FuturePool extends AnyRef

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

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

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

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

  46. class InterruptibleExecutorServiceFuturePool extends ExecutorServiceFuturePool

  47. trait JavaSingleton extends AnyRef

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

  48. class JavaTimer extends Timer

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

    An implementation of java.

  50. final class Local[T] extends AnyRef

    A Local is a ThreadLocal whose scope is flexible.

  51. class LongOverflowException extends Exception

  52. trait Managed[+T] extends AnyRef

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

  53. class MockTimer extends Timer

  54. trait Monitor extends AnyRef

    A Monitor is a composable exception handler.

  55. 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.

  56. class NoFuture extends Future[Nothing]

    A future with no future (never completes).

  57. trait NoStacktrace extends Exception

  58. class NullTimer extends Timer

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

  59. trait Pool[A] extends AnyRef

  60. class Promise[A] extends Future[A] with Responder[A]

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

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

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

  62. trait ReferenceCountedTimer extends Timer

  63. class ReferenceCountingTimer extends ReferenceCountedTimer

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

  65. class RichU64ByteArray extends AnyRef

  66. class RichU64Long extends AnyRef

  67. class RichU64String extends AnyRef

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

  68. class ScheduledThreadPoolTimer extends Timer

  69. trait SignalHandler extends AnyRef

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

  71. trait StateMachine extends AnyRef

  72. trait Stopwatch extends AnyRef

    A stopwatch may be used to measure elapsed time.

  73. class StorageUnit extends Ordered[StorageUnit]

    Representation of storage units.

  74. class SunSignalHandler extends SignalHandler

  75. trait TempFolder extends AnyRef

    Test mixin that creates a new folder for a block of code to execute in.

  76. class ThreadStoppingTimer extends Timer

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

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

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

  79. trait TimeControl extends AnyRef

  80. class TimeFormat extends AnyRef

    A thread-safe wrapper around a SimpleDateFormat object.

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

    A common trait for time-like values.

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

  83. class TimeoutException extends java.util.concurrent.TimeoutException

  84. trait Timer extends AnyRef

    Timers are used to schedule tasks in the future.

  85. trait TimerTask extends Closable

    TimerTasks represent pending tasks scheduled by a Timer.

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

    This class represents a computation that can succeed or fail.

  87. trait Updatable[T] extends AnyRef

    Denotes an updatable container.

  88. trait Var[+T] extends AnyRef

    Trait Var represents a variable.

  89. final class Vars extends AnyRef

  90. trait Witness[-N] extends AnyRef

    A witness is the recipient of Event.

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

    A Java analog of Event[A]().

  92. final class Witnesses extends AnyRef

  93. 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).

  94. 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.

  95. 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

    Await the result of some action.

  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

  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 com.twitter.util.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 com.twitter.util.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 Time extends TimeLikeOps[Time] with Serializable

    Use Time.now in your program instead of System.currentTimeMillis, and unit tests will be able to adjust the current time to verify timeouts and other time-dependent behavior, without calling sleep.

  45. val TimeConversions: time.type

  46. object Timer

  47. object Try

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

  48. object U64

  49. object Unsafe

  50. object Var

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

  51. object Witness

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

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