|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--edu.virginia.cs.mng.hypercast.DT.DT_Node
|
+--edu.virginia.cs.mng.hypercast.DT.DT_Node_ServerJoin
This class extends the basic Delaunay triangulation node to provide a mechanism for joining a overlay or resolving partitions through a server.
Partition solving and Joins are initiated by the node sending a ServerRequest message to the Server. The server responds by sending a ServerReply message back to the node.
The NewNode message will be routed on the topology to the node in the overlay that is very close to the joining node by compass routing. That node will then send attempt to add the new node as a neighbor.
| Field Summary | |
static float |
BACKOFF_RATIO
When server does not respond, ratio of backoff. |
private int |
backoffCounter
Counter for exponential backoff. |
static int |
DEAD
Node state |
static int |
INCOMPLETE
Node state |
static int |
JOINING
Node state |
static int |
LEADER_INCOMPLETE
Node state |
static int |
LEADER_STABLE
Node state |
private long |
MAX_SERVER_TIME
In milliseconds, the maximum server heartbeat time before a backup server is tried. |
static long |
MAX_SERVER_TIME_DEFAULT
String for the maximum server delay before trying a backup server. |
static java.lang.String |
MAX_SERVER_TIME_PROPERTY_NAME
Name of property controlling the maximum server delay before trying a backup server. |
private long |
MIN_SERVER_TIME
In milliseconds, the default server heartbeat time. |
static long |
MIN_SERVER_TIME_DEFAULT
String for the default server heartbeat time. |
static java.lang.String |
MIN_SERVER_TIME_PROPERTY_NAME
Name of property controlling the default server heartbeat time. |
private int |
sendAttempts
Number of Attempts to send message to server. |
static int |
SERVER_TIMER_INDEX
Adapter timer index used for server heartbeat. |
private int |
serverIndex
The index of the server being sent to. |
private boolean |
serverSaidThisWasLeader
True, if at time of last receive, Server thought this was the Leader. |
private boolean |
serverTimerCleared
Used to coordinate resetting and clearing of the server timer. |
static int |
STABLE
Node state |
private long |
timeOfLastReceive
Time the last message was received from the server. |
static int |
UNCONFIRMED_LEADER_INCOMPLETE
Node state |
static int |
UNCONFIRMED_LEADER_STABLE
Node state |
static boolean |
USE_NEW_NODE_MESSAGES
Used to turn on and off the use of NewNode messages. |
| Constructor Summary | |
DT_Node_ServerJoin(OverlaySocketConfig c,
I_UnicastAdapter a)
|
|
DT_Node_ServerJoin(OverlaySocketConfig c,
I_UnicastAdapter a,
DT_LogicalAddress startingCoords)
|
|
| Method Summary | |
protected void |
changeServerTimerToTime(long newTime)
|
java.lang.String[] |
getSchema()
Part of I_Stats interface. |
private int |
getState()
Returns the current state of the node. |
java.lang.String |
getStats(java.lang.String name)
Part of I_Stats interface. |
private void |
handleServerReply(DT_Message m)
Performs actions for the ServerReply message. |
void |
joinGroup()
Joins overlay multicast overlay. |
void |
leaveGroup()
Leaves overlay multicast Overlay. |
void |
messageArrivedFromAdapter(I_Message a)
I_AdapterCallBack function. |
protected void |
sendToServer(byte packet_type)
Sends a message of specified type to the server. |
void |
setStats(java.lang.String name,
java.lang.String value)
Part of I_Stats interface. |
void |
timerExpired(int timer_index)
Handles timer events, such as when the Leader sends a message to the server. |
| Methods inherited from class edu.virginia.cs.mng.hypercast.DT.DT_Node |
changeSlowHeartbeatToFastHeartbeat,
createLogicalAddress,
createLogicalAddress,
deleteNeighbor,
getAllNeighbors,
getChildren,
getMyAddressPair,
getNextHopToLeader,
getParent,
goodbyeAllNeighbors,
handleGoodbye,
handleHello,
handleNewNode,
handleNodePing,
handleTimeoutTimer,
helloAllNeighbors,
isCandidateNeighbor,
isLeader,
restoreMessage,
sendGoodbyeMessage,
sendHelloNeighborMessage,
sendHelloNotNeighborMessage,
sendHellosToCandidateNeighbors,
sendNewNodeMessage,
sendTestMessage |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final long MIN_SERVER_TIME_DEFAULT
public static final java.lang.String MIN_SERVER_TIME_PROPERTY_NAME
public static final long MAX_SERVER_TIME_DEFAULT
public static final java.lang.String MAX_SERVER_TIME_PROPERTY_NAME
public static final int SERVER_TIMER_INDEX
public static final float BACKOFF_RATIO
public static final boolean USE_NEW_NODE_MESSAGES
public static final int JOINING
public static final int STABLE
public static final int LEADER_STABLE
public static final int INCOMPLETE
public static final int LEADER_INCOMPLETE
public static final int UNCONFIRMED_LEADER_STABLE
public static final int UNCONFIRMED_LEADER_INCOMPLETE
public static final int DEAD
private long MIN_SERVER_TIME
private long MAX_SERVER_TIME
private boolean serverTimerCleared
private int serverIndex
private int sendAttempts
private int backoffCounter
private long timeOfLastReceive
private boolean serverSaidThisWasLeader
| Constructor Detail |
public DT_Node_ServerJoin(OverlaySocketConfig c,
I_UnicastAdapter a,
DT_LogicalAddress startingCoords)
public DT_Node_ServerJoin(OverlaySocketConfig c,
I_UnicastAdapter a)
| Method Detail |
public void joinGroup()
public void leaveGroup()
public void messageArrivedFromAdapter(I_Message a)
private void handleServerReply(DT_Message m)
protected void sendToServer(byte packet_type)
protected final void changeServerTimerToTime(long newTime)
public void timerExpired(int timer_index)
private int getState()
public java.lang.String getStats(java.lang.String name)
throws StatsException
I_Stats.getStats(java.lang.String)
public void setStats(java.lang.String name,
java.lang.String value)
throws StatsException
I_Stats.setStats(java.lang.String, java.lang.String)
public java.lang.String[] getSchema()
throws StatsException
I_Stats.getSchema()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||