trait Group[T] extends AnyRef
A group is a dynamic set of T
-typed values. It is used to
represent dynamic hosts and operations over such lists. Its
flexibility is derived from the ability to map, creating
derived groups. The map operation ensures that each element is
mapped over exactly once, allowing side-effecting operations to
rely on this to implement safe semantics.
Note: querying groups is nonblocking, which means that derived groups are effectively eventually consistent.
Note: T
s must be hashable, defining hashCode
and
equals
to ensure that maps have exactly-once semantics.
Note: Groups are invariant because Scala's Sets are. In the case of sets, this is an implementation artifact, and is unfortunate, but it's better to keep things simpler and consistent.
- Self Type
- Group[T]
- Annotations
- @deprecated
- Deprecated
(Since version 6.7.x) Use
com.twitter.finagle.Name
to represent clusters instead
- Alphabetic
- By Inheritance
- Group
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: Group[T]): Group[T]
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def apply(): Set[T]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
collect[U](f: PartialFunction[T, U]): Group[U]
Create a new group by collecting each element of this group with
f
.Create a new group by collecting each element of this group with
f
.f
is guaranteed to be invoked exactly once for each element of the group, even for dynamic groups. -
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[U](f: (T) ⇒ U): Group[U]
Create a new group by mapping each element of this group with
f
.Create a new group by mapping each element of this group with
f
.f
is guaranteed to be invoked exactly once for each element of the groups, even for dynamic groups. -
final
def
members: Set[T]
The current members of this group.
The current members of this group. If the group has not changed, the same object is returned. This allows a simple object identity check to be performed to see if the Group has been updated.
-
def
named(n: String): Group[T]
Name the group
n
.Name the group
n
.- returns
this
mixed in withLabelledGroup
, namedn
-
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
lazy val
ref: AtomicReference[Set[T]]
- Attributes
- protected[finagle]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Group → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()