|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.tools.rumen.Node
public class Node
Node represents a node in the cluster topology. A node can be a
MachineNode, or a RackNode, etc.
| Constructor Summary | |
|---|---|
Node(String name,
int level)
|
|
| Method Summary | |
|---|---|
boolean |
addChild(Node child)
Add a child node to this node. |
int |
compareTo(Node o)
|
boolean |
equals(Object obj)
|
Set<Node> |
getChildren()
Get the children of this node. |
int |
getLevel()
Get the level of the node. |
String |
getName()
Get the name of the node. |
Node |
getParent()
Get the parent node. |
boolean |
hasChildren()
Does this node have any children? |
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Node(String name,
int level)
name - A unique name to identify a node in the cluster.level - The level of the node in the cluster| Method Detail |
|---|
public String getName()
public int getLevel()
public boolean addChild(Node child)
child - The child node to be added. The child node should currently not be belong to another cluster topology.
public boolean hasChildren()
public Set<Node> getChildren()
public Node getParent()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Objectpublic int compareTo(Node o)
compareTo in interface Comparable<Node>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||