|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--edu.virginia.cs.mng.hypercast.HC.HC_Node
HC_Node is a full implementation of the Hypercube protocol.
| Field Summary | |
private I_MulticastAdapter |
Adapter
The multicast adapter that this protocol node runs on |
private OverlaySocketConfig |
config
The OverlaySocketConfig object containing the properties of this group. |
static byte |
Dead
The state of this node, dead |
static byte |
HRoot
The state of this node, hroot |
static byte |
HRootMissingNeighbor
The state of this node, hroot missing neighbor |
static byte |
HRootMissingNeighborAction
The state of this node, hroot missing neighbor action |
private boolean |
joined
True if joinGroup has not been followed by a leaveGroup |
static byte |
Joining
The state of this node, joinng |
static byte |
JoiningWait
The state of this node, wait for joining |
static byte |
Leaving
The state of this node, leaving |
(package private) int |
MaxAge
The maximum time of a node's age, in heartbeats (Ttimeout / Theartbeat) |
(package private) static int |
MaxHypercubeDim
The maximum of the Hypercube dimension, pretty much must be 31 |
(package private) int |
MaxMissingNeighbor
The maximum missing neighbor time of a node, in heartbeats (Tmissing / Theartbeat) |
private int |
MaxSuppressJoinBeacon
The maximum supressing joining time of a node, in heartbeats (Tjoining / Theartbeat) |
static byte |
MissingNeighbor
The state of this node, missing neighbor |
static byte |
MissingNeighborAction
The state of this node, missing neighbor action |
(package private) HC_LogicalAddress |
MyLogicalAddress
The logical address of this node |
private byte |
MyState
The state of this node |
private HC_Neighborhood |
neighbors
The neighborhood of this node |
private int |
SleepTime
The Heart Beat time of the node, in ms |
static byte |
Stable
The state of this node, stable |
static byte |
StartHypercube
The state of this node, start a hypercube |
| Constructor Summary | |
HC_Node(OverlaySocketConfig c,
I_MulticastAdapter madapter)
Constructs a HC_Node object with an infrustructure I_UnicastAdapter |
|
| Method Summary | |
I_LogicalAddress |
createLogicalAddress(byte[] laddr,
int offset)
Creates an I_LogicalAddress object from an bytes array. |
I_AddressPair[] |
getAllNeighbors()
Gets the AddressPair[] of this node's all neighbors |
I_AddressPair[] |
getChildren(I_LogicalAddress root)
Gets the AddressPair[] of this node's Children with reference to a given Root |
HC_AddressPair |
getHRoot()
Gets the AddressPair of the HRoot |
java.lang.String |
getLAAddress(java.lang.String NodePALAPair)
Gets logical address from a node's AddressPair |
I_AddressPair |
getMyAddressPair()
Gets the AddressPair of this node |
java.lang.String |
getNeighborAttribute(int index,
java.lang.String attribute)
Gets neighbor's physical address or logical address |
java.lang.String |
getPAAddress(java.lang.String NodePALAPair)
Gets physical address from a node's AddressPair. |
I_AddressPair |
getParent(I_LogicalAddress root)
Gets the AddressPair[] of this node's Children with reference to a given Root. |
HC_AddressPair |
getPred()
Gets the AddressPair of the Predecessesor of this node in the Hypercube |
java.lang.String[] |
getSchema()
Get the Statistics information description of this Adapter. |
byte |
getState()
Gets the node's current state |
java.lang.String |
getStats(java.lang.String name)
Get the Statistics information of this HC_Node. |
HC_AddressPair |
getSucc()
Gets the AddressPair of the Sueecssor of this node in the Hypercube |
void |
joinGroup()
Joins a multicast group |
void |
leaveGroup()
Leaves a multicast group |
private void |
leaveNeighborhood()
Sends leave message to all neighbors |
static int |
MaxAddress()
Gets the maximum logical address number of this hypercube. |
void |
messageArrivedFromAdapter(I_Message msg)
Processes the message received from an I_UnicastAdapter. |
private void |
multicastSend(byte type)
Sends Hypercast Messages to Multicast address through the Adapter |
private void |
pingNeighbors()
Sends ping message to all neighbors |
private void |
resetNeighborhood()
Resets all neighbors |
I_Message |
restoreMessage(byte[] recvbuff,
int[] validBytesStart,
int validBytesEnd)
Creates an HC_Message if there are enough valid bytes in the buffer. |
void |
setStats(java.lang.String name,
java.lang.String value)
Sets the Statistic information in this Adapter. |
void |
timerExpired(int timerID)
This function processes a timer event This is also the kernel part of the Hypercast protocol. |
private void |
unicastSend(byte type,
I_PhysicalAddress paddr,
HC_LogicalAddress laddr)
Sends Hypercast Messages to Unicast address through the Adapter |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private OverlaySocketConfig config
private I_MulticastAdapter Adapter
private HC_Neighborhood neighbors
HC_LogicalAddress MyLogicalAddress
private byte MyState
public static final byte Joining
public static final byte Stable
public static final byte MissingNeighbor
public static final byte MissingNeighborAction
public static final byte HRoot
public static final byte HRootMissingNeighbor
public static final byte HRootMissingNeighborAction
public static final byte Leaving
public static final byte StartHypercube
public static final byte JoiningWait
public static final byte Dead
static final int MaxHypercubeDim
private int SleepTime
int MaxAge
int MaxMissingNeighbor
private int MaxSuppressJoinBeacon
private boolean joined
| Constructor Detail |
public HC_Node(OverlaySocketConfig c,
I_MulticastAdapter madapter)
adp - an object of I_MulticastAdapter| Method Detail |
public void joinGroup()
public void leaveGroup()
public static int MaxAddress()
public I_Message restoreMessage(byte[] recvbuff,
int[] validBytesStart,
int validBytesEnd)
I_AdapterCallBack.restoreMessage(byte[], int[], int)
public I_LogicalAddress createLogicalAddress(byte[] laddr,
int offset)
laddr - bytes arraypublic void messageArrivedFromAdapter(I_Message msg)
msg - I_Messagepublic void timerExpired(int timerID)
This is also the kernel part of the Hypercast protocol. The HC_Node changes it's state, pings it's neighborhod everytime there is a timer event comes in.
time_id - time event ID
private void unicastSend(byte type,
I_PhysicalAddress paddr,
HC_LogicalAddress laddr)
type - Message typepaddr - I_PhysicalAddress of destinationladdr - HC_LogicalAddress of destinationprivate void multicastSend(byte type)
type - Message typeprivate void pingNeighbors()
private void resetNeighborhood()
private void leaveNeighborhood()
public I_AddressPair getMyAddressPair()
public HC_AddressPair getHRoot()
public HC_AddressPair getSucc()
public HC_AddressPair getPred()
public I_AddressPair getParent(I_LogicalAddress root)
root - HC_LogicalAddress object of a Rootpublic I_AddressPair[] getChildren(I_LogicalAddress root)
root - HC_LogicalAddress object of a Rootpublic I_AddressPair[] getAllNeighbors()
public byte getState()
public java.lang.String getStats(java.lang.String name)
throws StatsException
name - the String representation of a Statistic name
public void setStats(java.lang.String name,
java.lang.String value)
throws StatsException
name - the String representation of a Statistic namevalue - the String representation of the Statistic value
public java.lang.String[] getSchema()
throws StatsException
public java.lang.String getNeighborAttribute(int index,
java.lang.String attribute)
attribute - PA or LApublic java.lang.String getPAAddress(java.lang.String NodePALAPair)
public java.lang.String getLAAddress(java.lang.String NodePALAPair)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||