T - the NettyTuple used as part of this group.public class Group<T> extends Object implements Comparable<Group<T>>
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.logging.log4j.Logger |
logger |
| Modifier and Type | Method and Description |
|---|---|
Group<T> |
add(Destination<T> d) |
int |
compareTo(Group<T> o) |
void |
connected(Destination<T> d)
Callback whenever the connection to one destination suceeded.
|
void |
disconnected(Destination<T> d)
Callback whenever the connection to one destination failed.
|
long |
getConfiguredWeight() |
long |
getEffectiveWeight() |
String |
getName() |
void |
start()
Start this group.
|
void |
stop()
Stop this group
|
String |
toString() |
boolean |
write(T packet,
Object context)
Write a packet to one of the destination available in a group.
|
public Group<T> add(Destination<T> d)
public long getEffectiveWeight()
public long getConfiguredWeight()
public void connected(Destination<T> d)
d - the newly connected destinationpublic void disconnected(Destination<T> d)
d - the lost destinationpublic int compareTo(Group<T> o)
compareTo in interface Comparable<Group<T>>public void start()
public void stop()
public String getName()
public boolean write(T packet, Object context)
packet - the data to sendcontext - the context object to be associated to the acknowledgementCopyright © 2023. All rights reserved.