public class Node extends Object implements Externalizable
| Modifier and Type | Field and Description |
|---|---|
ConcurrentHashMap<String,Edge> |
neighbors |
String |
nodeId |
long |
TS |
| Constructor and Description |
|---|
Node() |
Node(Node_thrift value)
Constructs a Java node representation of the Thrift node
|
Node(Node n)
Creates a shallow clone of the given node
|
Node(String id) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNeighbor(String index,
Edge edge) |
ConcurrentHashMap<String,Edge> |
getNeighbors() |
String |
getNodeId() |
Long |
getTS() |
String |
printNodeEdges() |
void |
readExternal(ObjectInput in) |
void |
setNeighbors(ConcurrentHashMap<String,Edge> neighbors) |
void |
setNodeId(String nodeId) |
void |
setTS(Long ts) |
NodeData |
toNodeData(Map map,
byte classNameID)
Converts this particular node into a
NodeData. |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public String nodeId
public long TS
public ConcurrentHashMap<String,Edge> neighbors
public Node()
public Node(Node n)
n - The node to shallowly clonepublic Node(String id)
id - The unique identifier for this nodepublic Node(Node_thrift value)
value - The Thrift node that is to be converted into a Java nodepublic String getNodeId()
public void setNodeId(String nodeId)
public ConcurrentHashMap<String,Edge> getNeighbors()
public void setNeighbors(ConcurrentHashMap<String,Edge> neighbors)
public Long getTS()
public void setTS(Long ts)
public void addNeighbor(String index, Edge edge)
index - The unique identifier of the edgeedge - The edge being constructed between two nodespublic String printNodeEdges()
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic NodeData toNodeData(Map map, byte classNameID)
NodeData.
Called only by HashtableServerImpl.readNodeProperties(Object, Map)map - classNameID - NodeData representation of this Node.