Class

com.twitter.util.tunable.TunableMap

Mutable

Related Doc: package TunableMap

Permalink

abstract class Mutable extends TunableMap

A TunableMap that can be updated via put and clear operations. Putting a value for a given id will update the current value for the id, or create a new Tunable if it does not exist. The type of the new value must match that of the existing value, or a ClassCastException will be thrown.

apply returns a Tunable for a given TunableMap.Key and creates it if does not already exist. Updates to the TunableMap update the underlying Tunables; for example, a Tunable returned from TunableMap.apply will produce an updated value when Tunable.apply() is called if the TunableMap is updated. clear clears the underlying Tunable for a given TunableMap.Key but does not remove it from the map; this has the effect that calling Tunable.apply() on a previously retrieved Tunable produces None. This behavior is desirable because a Tunable's value may be cleared and re-set, and we want Tunable applications to see those updates.

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

Instance Constructors

  1. new Mutable()

    Permalink

Abstract Value Members

  1. abstract def apply[T](key: Key[T]): Tunable[T]

    Permalink

    Returns a Tunable for the given key.id in the TunableMap.

    Returns a Tunable for the given key.id in the TunableMap. If the Tunable is not of type T or a subclass of type T, throws a ClassCastException

    Definition Classes
    TunableMap
  2. abstract def clear[T](key: Key[T]): Unit

    Permalink

    Clear a Tunable in TunableMap.

    Clear a Tunable in TunableMap. This does not remove the Tunable from the Map, but rather clears its value such that applying it will produce None.

  3. abstract def entries: Iterator[Entry[_]]

    Permalink

    Returns an Iterator over TunableMap.Entry for each Tunable in the map with a value.

    Returns an Iterator over TunableMap.Entry for each Tunable in the map with a value.

    Definition Classes
    TunableMap
  4. abstract def put[T](id: String, clazz: Class[T], value: T): Key[T]

    Permalink

    Java-friendly API

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def ++=(that: TunableMap): Unit

    Permalink

    Add all entries in that TunableMap to this TunableMap.

    Add all entries in that TunableMap to this TunableMap. Entries already present in this map are updated. Updates to each Tunable in the map are atomic, but the change is not atomic at the macro level.

  4. def --=(that: TunableMap): Unit

    Permalink

    Remove all entries by key in that TunableMap from this TunableMap.

    Remove all entries by key in that TunableMap from this TunableMap. Removal of each Tunable in the map are atomic, but the change is not atomic at the macro level.

  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def contentString: String

    Permalink

    Returns a String representation of a TunableMap, in the form: TunableMap(id1 -> value1, id2 -> value2)

    Returns a String representation of a TunableMap, in the form: TunableMap(id1 -> value1, id2 -> value2)

    Entries are sorted alphabetically by id.

    Definition Classes
    TunableMap
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def orElse(that: TunableMap): TunableMap

    Permalink

    Compose this TunableMap with another TunableMap.

    Compose this TunableMap with another TunableMap. Tunables retrieved from the composed map prioritize the values of Tunables in the this map over the other TunableMap.

    Definition Classes
    TunableMap
  19. final def put[T](id: String, value: T)(implicit m: Manifest[T]): Key[T]

    Permalink

    Put a Tunable with id id and value value into the TunableMap.

    Put a Tunable with id id and value value into the TunableMap. If the Tunable for that id already exists, update the value to value.

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from TunableMap

Inherited from AnyRef

Inherited from Any

Ungrouped