|
${header} | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The interface defining the Chord Service
| Field Summary | |
static java.lang.String |
refModuleClassID
The module class identifier of this service that may be used as a handler name when filtering messages |
| Fields inherited from interface net.jxta.platform.Module |
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK |
| Method Summary | |
void |
addListener(DHTListener c)
Add a listener |
void |
blockOnSend()
Synchronization for the Messaging between peers |
void |
checkPredecessor()
Checks if predecessor is alive If not remove the current predecessor |
java.math.BigInteger |
closest_preceding_node(java.math.BigInteger target)
If the id of the successor of the node we are at is between this identifier and the desired identifier, return this node |
java.math.BigInteger |
find_predecessor(java.math.BigInteger id,
int mode,
int owner)
Finds the predecessor of an id Blocking call |
void |
find_successor(QueryMessage q)
Is called by lookup, it in turn calls find_predecessor and returns the successor of this (found) predecessor |
void |
fix_fingers()
Periodically fix fingers by finding successor of the next identifier (n+1,2,4,8,16 etc...) |
FingerTable |
getFingerTable()
|
boolean |
inInterval(java.math.BigInteger id,
java.math.BigInteger begin,
java.math.BigInteger end,
boolean incLeft,
boolean incRight)
Checks whether id is in the interval [begin,end] or (begin,end) depending on the boolean inclusive |
void |
init_finger_table(java.math.BigInteger bootstrap)
Init the finger table |
boolean |
isLocal(java.math.BigInteger id)
|
int |
log2(java.math.BigInteger x)
Log base 2 |
void |
lookup(java.math.BigInteger id,
int owner)
Lookup the successor of an identifier |
void |
lookup(java.math.BigInteger id,
int owner,
java.lang.String squidQuery)
Lookup the successor of an identifier with a Squid Query |
void |
notify(java.math.BigInteger yourPred)
Notify a successor that id might be its predecessor |
void |
notifyReceived()
Invoked in messageHandler's processResponse to notify the lookup Service that a response for its blocking query has just been received, and the response identifier of the query set as successor ID. |
void |
receivedPredecessor(java.math.BigInteger predecessor)
When a predecessor query is answered this method is invoked from the MessageHandler processResponse. |
void |
receivedSuccessor(QueryMessage qm)
This method is invoked from the MessageHandler processResponse. |
void |
removeListener(DHTListener c)
Remove a listener |
void |
stabilize()
Stabilization protocol |
void |
update_finger_table(QueryMessage q)
UPdate finger table |
void |
update_others()
Update others to point to newly joined node |
| Methods inherited from interface meteor.dht.DHTService |
bootstrap, get, getNodeID, getTopologySize, join, lookup, put, setTopologySize |
| Methods inherited from interface net.jxta.service.Service |
getImplAdvertisement, getInterface |
| Methods inherited from interface net.jxta.platform.Module |
init, startApp, stopApp |
| Field Detail |
public static final java.lang.String refModuleClassID
| Method Detail |
public void addListener(DHTListener c)
public void removeListener(DHTListener c)
public FingerTable getFingerTable()
public int log2(java.math.BigInteger x)
public void init_finger_table(java.math.BigInteger bootstrap)
public void update_others()
public void update_finger_table(QueryMessage q)
public void find_successor(QueryMessage q)
public java.math.BigInteger find_predecessor(java.math.BigInteger id,
int mode,
int owner)
public java.math.BigInteger closest_preceding_node(java.math.BigInteger target)
public boolean inInterval(java.math.BigInteger id,
java.math.BigInteger begin,
java.math.BigInteger end,
boolean incLeft,
boolean incRight)
public boolean isLocal(java.math.BigInteger id)
public void stabilize()
public void notify(java.math.BigInteger yourPred)
public void receivedPredecessor(java.math.BigInteger predecessor)
predecessor - the returned predecessor ID from this node's successorpublic void receivedSuccessor(QueryMessage qm)
public void blockOnSend()
public void notifyReceived()
public void fix_fingers()
public void checkPredecessor()
public void lookup(java.math.BigInteger id,
int owner)
public void lookup(java.math.BigInteger id,
int owner,
java.lang.String squidQuery)
|
${header} | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||