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.
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.
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.
Name the group n
.
Name the group n
.
this
mixed in with LabelledGroup
, named n
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, definininghashCode
andequals
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.
(Since version 6.7.x) Use
com.twitter.finagle.Name
to represent clusters instead