|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectoogp2p.chord.ChordAdministrator
| Field Summary | |
static java.lang.String |
DEFAULT_FILE_DIR
|
private java.io.File |
myFiles
|
private FixFingers |
myFixFingers
|
private FixKeys |
myFixKeys
|
private boolean |
myJoined
|
(package private) ChordNode |
myNode
|
private Stabilize |
myStabilizer
|
private boolean |
myValidFlag
|
| Constructor Summary | |
ChordAdministrator()
|
|
| Method Summary | |
void |
addFiles()
Adds the files from the users's shared directory to the chord ring |
void |
addKey(byte[] key,
java.net.InetAddress nodeIP)
|
void |
buildFingers()
|
void |
buildFingers(ChordLocation n)
Update finger table via searches by passed in node |
void |
createChordRing()
creates a chordRing |
void |
fixKeys()
|
java.util.Iterator |
getMapping(byte[] key)
|
ChordNode |
getNode()
|
ChordLocation |
getPredecessor()
|
java.net.InetAddress |
getSuccessorIP()
returns IP address of node's successor |
boolean |
isJoined()
|
boolean |
isValid()
whether or not the chord thing is valid |
void |
join(ChordLocation connectorLoc)
|
ChordLocation |
nodeLocation()
returns chord node location of self |
void |
notify(ChordLocation possibleNewPred)
|
void |
printFingers()
|
void |
printKeys()
|
void |
refreshFingers()
Refreshes the Fingers |
void |
setFinger(ChordLocation updatedLoc,
int fingerPos)
|
void |
setToInvalid()
|
void |
setToValid()
|
void |
stabilize(ChordLocation pofs)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
ChordNode myNode
private boolean myJoined
private boolean myValidFlag
private Stabilize myStabilizer
private FixFingers myFixFingers
private FixKeys myFixKeys
public static java.lang.String DEFAULT_FILE_DIR
private java.io.File myFiles
| Constructor Detail |
public ChordAdministrator()
| Method Detail |
public void join(ChordLocation connectorLoc)
public void addFiles()
public void setToInvalid()
public void setToValid()
public boolean isValid()
public void createChordRing()
public ChordLocation nodeLocation()
public ChordNode getNode()
public java.net.InetAddress getSuccessorIP()
public ChordLocation getPredecessor()
public void stabilize(ChordLocation pofs)
pofs - -- my Successors' Predecessor
Stabilizes myNode with respect to pofspublic void notify(ChordLocation possibleNewPred)
public void buildFingers(ChordLocation n)
public void buildFingers()
public boolean isJoined()
public void setFinger(ChordLocation updatedLoc,
int fingerPos)
fingerPos - finger position
Updates the node in the Fingers at position fingerPos. (First makes sure that
the node at fingerPos in Fingers has the same nodeID as the updatedNodepublic void refreshFingers()
public void printFingers()
public void addKey(byte[] key,
java.net.InetAddress nodeIP)
public void printKeys()
public java.util.Iterator getMapping(byte[] key)
key - returns the InetAddress what key maps topublic void fixKeys()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||