public static enum TStream.Routing extends java.lang.Enum<TStream.Routing>
TStream.parallel(Supplier, Routing)
Enum Constant and Description |
---|
BROADCAST
Tuples are broadcast to all channels.
|
HASH_PARTITIONED
Tuples will be consistently routed to the same channel based upon
their
hashCode() . |
KEY_PARTITIONED
Tuples will be consistently routed to the same channel based upon
their key.
|
ROUND_ROBIN
Tuples will be routed to parallel channels such that an even
distribution is maintained.
|
Modifier and Type | Method and Description |
---|---|
static TStream.Routing |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static TStream.Routing[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TStream.Routing ROUND_ROBIN
public static final TStream.Routing KEY_PARTITIONED
TStream.parallel(Supplier, Function)
identity function
when using TStream.parallel(Supplier, Routing)
t
is the return from keyer.apply(t)
.
t1
and t2
will appear on
the same channel if for their keys k1
and k2
k1.equals(k2)
is true.
k1
and k2
are not equal then there is
no guarantee about which channels t1
and t2
will appear on, they may end up on the same or different channels.
equals
and
hashCode()
.public static final TStream.Routing HASH_PARTITIONED
hashCode()
.public static final TStream.Routing BROADCAST
public static TStream.Routing[] values()
for (TStream.Routing c : TStream.Routing.values()) System.out.println(c);
public static TStream.Routing valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null