abstract class ToggleMap extends AnyRef
A collection of Int-typed toggles which can be used to build a form of feature toggles which allow for modifying behavior without changing code.
Expected usage is for code to have toggles passed into their constructors instead of dynamically creating new toggles on every call.
- Self Type
- ToggleMap
- See also
ServiceLoadedToggleMap and StandardToggleMap for typical usage entry points.
Feature Toggles for detailed discussion on the topic.
- Alphabetic
- By Inheritance
- ToggleMap
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ToggleMap()
Abstract Value Members
- abstract def apply(id: String): Toggle
Get a Toggle for this
id
.Get a Toggle for this
id
.The
Toggle.isDefined
method should returnfalse
if the ToggleMap does not know about that Toggle or it is currently not "operating" on thatid
.- id
the identifying name of the
Toggle
. These should generally be fully qualified names to avoid conflicts between libraries. For example, "com.twitter.finagle.CoolThing".
- See also
get for a Java friendly version
- abstract def iterator: Iterator[Metadata]
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def get(id: String): Toggle
Get a Toggle for this
id
.Get a Toggle for this
id
. Java-friendly synonym forapply
.The
Toggle.isDefined
method should returnfalse
if the ToggleMap does not know about that Toggle or it is currently not "operating" on thatid
.- id
the identifying name of the
Toggle
. These should generally be fully qualified names to avoid conflicts between libraries. For example, "com.twitter.finagle.CoolThing".
- Note
this returns a
java.lang.Integer
for Java compatibility.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def orElse(that: ToggleMap): ToggleMap
Creates a ToggleMap which uses
this
beforethat
.Creates a ToggleMap which uses
this
beforethat
.apply returns a Toggle that uses the Toggle from
this
if itisDefined
for the input, before tryingthat
.iterator includes metadata from both
self
andthat
, withself
's metadata taking precedence on conflicting ids. Note however that if aToggleMetadata.description
is not defined onself
, the description fromthat
will be preferred. This is done because many sources ofToggleMaps
do not have a description defined and we want to surface that information. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()