public static class MeshOrganizer.Node extends Object implements Serializable, Comparable<MeshOrganizer.Node>
| Modifier | Constructor and Description |
|---|---|
protected |
Node(boolean rootNode) |
| Modifier and Type | Method and Description |
|---|---|
MeshOrganizer.Node |
addDownstreamNode(@NonNull MeshOrganizer.Node node)
This method adds downstream node to the list of connections
|
int |
compareTo(@NonNull MeshOrganizer.Node o) |
int |
distanceFromRoot()
This method returns number of hops between
|
boolean |
equals(Object o) |
Collection<MeshOrganizer.Node> |
getDescendantNodes()
This method returns all nodes
|
Collection<MeshOrganizer.Node> |
getDownstreamNodes()
This method returns collection of nodes that have direct connection to this node
|
protected MeshOrganizer.Node |
getNextCandidate(MeshOrganizer.Node node)
This method return candidate for new connection
|
MeshOrganizer.Node |
getUpstreamNode()
This method returns the node this one it connected to
|
int |
hashCode() |
long |
numberOfDescendants()
This method returns number of downstream nodes connected to this node
|
long |
numberOfDownstreams()
This method returns number of nodes that has direct connection for this node
|
protected MeshOrganizer.Node |
pushDownstreamNode(@NonNull MeshOrganizer.Node node)
This method pushes node to the bottom of this node downstream
|
void |
removeFromDownstreams(@NonNull MeshOrganizer.Node node)
This method removes
|
protected MeshOrganizer.Node |
setUpstreamNode(@NonNull MeshOrganizer.Node node)
This method allows to set master node for this node
|
NodeStatus |
status()
This method returns current status of this node
|
protected void |
status(@NonNull NodeStatus status)
This method ret
|
String |
toString() |
void |
truncateDownstreams()
This method remove all downstreams for a given node
|
public NodeStatus status()
protected void status(@NonNull
@NonNull NodeStatus status)
status - protected MeshOrganizer.Node getNextCandidate(MeshOrganizer.Node node)
node - public MeshOrganizer.Node addDownstreamNode(@NonNull @NonNull MeshOrganizer.Node node)
node - protected MeshOrganizer.Node pushDownstreamNode(@NonNull @NonNull MeshOrganizer.Node node)
node - protected MeshOrganizer.Node setUpstreamNode(@NonNull @NonNull MeshOrganizer.Node node)
node - public MeshOrganizer.Node getUpstreamNode()
public long numberOfDescendants()
public long numberOfDownstreams()
public Collection<MeshOrganizer.Node> getDownstreamNodes()
public Collection<MeshOrganizer.Node> getDescendantNodes()
public int distanceFromRoot()
public void truncateDownstreams()
public void removeFromDownstreams(@NonNull
@NonNull MeshOrganizer.Node node)
node - public int compareTo(@NonNull
@NonNull MeshOrganizer.Node o)
compareTo in interface Comparable<MeshOrganizer.Node>Copyright © 2021. All rights reserved.