object WeightedAddress
This object contains utility functions for adding and removing weight metadata for com.twitter.finagle.Address.
These weights are consumed by a com.twitter.finagle.factory.TrafficDistributor.
- Alphabetic
- By Inheritance
- WeightedAddress
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- def apply(addr: Address, weight: Double): Address
Returns a new com.twitter.finagle.Address with attached weight metadata.
Returns a new com.twitter.finagle.Address with attached weight metadata. If the weight entry already exists in the metadata, it is overwritten.
- 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 extract(addr: Address): (Address, Double)
Extracts weight from metadata and returns an unweighted copy of
addr
.Extracts weight from metadata and returns an unweighted copy of
addr
. Returns the default value (1.0) if weight entry does not exist. - def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- 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()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unapply(addr: Address): Option[(Address, Double)]
A variant of
extract
that pattern matches against weight metadata, returning the unweighted address and weight.A variant of
extract
that pattern matches against weight metadata, returning the unweighted address and weight. Note that the input will always match, even if weight metadata is not present (in which case it returns the default weight 1.0). - 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()
- val weightKey: String