|
${header} | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
meteor.dht.can.CANServiceImpl
The implementation of the CAN DHT service providing an implementation for the DHT querying
| Field Summary | |
java.lang.String |
handlerName
|
net.jxta.peergroup.PeerGroup |
peergroup
|
static java.lang.String |
refModuleSpecID
|
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Fields inherited from interface meteor.dht.can.CANService |
refModuleClassID |
| Fields inherited from interface net.jxta.platform.Module |
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK |
| Constructor Summary | |
CANServiceImpl()
Constructor for the DHT service implementation |
|
| Method Summary | |
void |
addListener(DHTListener listener)
Add a listener to this class. |
void |
blockOnSend()
Synchronization for the Messaging between peers |
void |
bootstrap(java.lang.String peerID)
Start the bootstrapping |
void |
discoveryEvent(net.jxta.discovery.DiscoveryEvent e)
Is called when a discovery message is received Used ONLY during the bootstrap protocol |
void |
get(java.lang.String key)
Hashtable primitive to retrieve an entry from the table |
int |
getDimension()
Returns the dimension of the cartesian space |
net.jxta.document.Advertisement |
getImplAdvertisement()
Get the Implemetation advertisement |
net.jxta.service.Service |
getInterface()
|
java.math.BigInteger |
getNodeID(java.lang.String id)
Hashes the JXTA peer id into an overlay node id |
java.math.BigInteger |
getTopologySize()
Returns the size of the topoloy as an Integer In the case of a ring, the size of the ring, In the case of a mesh, the width ot th mesh |
void |
init(net.jxta.peergroup.PeerGroup group,
net.jxta.id.ID assignedID,
net.jxta.document.Advertisement implAdv)
Invoked when the service is added to the peergroup in the Loader class. |
boolean |
inMyZone(QueryMessage qm)
Determines if an identifier belongs to this node's zone |
void |
join(java.math.BigInteger bi)
|
void |
join(java.lang.String bootstrap)
The JOIN protocol If the target is identical to the local ID i.e. |
void |
lookup(java.math.BigInteger target,
int owner,
int mode)
Lookup the successor of an identifier |
java.math.BigInteger[] |
mapNodeToCoord(java.math.BigInteger nid)
Returns coordinates of the node ID in d dimensional space |
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 |
notifyReceived(Zone z)
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 |
put(java.lang.String key,
java.lang.String value)
Hashtable primitive to insert an element in the table |
void |
receivedDHTEntry(QueryMessage query)
Received a DHT Entry |
void |
removeListener(DHTListener listener)
Remove a listener |
void |
routeTo(QueryMessage qm)
Routes to this node |
void |
setDimension(int d)
Set the dimension |
void |
setTopologySize(int s)
Set the size of the topology For a mesh, the width of the mesh |
Zone |
splitZone(QueryMessage qm)
Splits the zone of this node |
int |
startApp(java.lang.String[] args)
Invoked when calling peergroup.startApps in Loader class. |
void |
stopApp()
Invoked when application stops |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String refModuleSpecID
public net.jxta.peergroup.PeerGroup peergroup
public java.lang.String handlerName
| Constructor Detail |
public CANServiceImpl()
| Method Detail |
public net.jxta.document.Advertisement getImplAdvertisement()
getImplAdvertisement in interface net.jxta.service.Servicepublic net.jxta.service.Service getInterface()
getInterface in interface net.jxta.service.Servicepublic void addListener(DHTListener listener)
addListener in interface CANServicepublic void removeListener(DHTListener listener)
removeListener in interface CANService
public void init(net.jxta.peergroup.PeerGroup group,
net.jxta.id.ID assignedID,
net.jxta.document.Advertisement implAdv)
throws net.jxta.exception.PeerGroupException
init in interface net.jxta.platform.Modulegroup - the peergroup to which this implementaiton belongsimplAdv - the implementaiton advertisement for this module
net.jxta.exception.PeerGroupExceptionpublic int startApp(java.lang.String[] args)
startApp in interface net.jxta.platform.Modulepublic void stopApp()
stopApp in interface net.jxta.platform.Modulepublic void setDimension(int d)
setDimension in interface CANServicepublic int getDimension()
getDimension in interface CANServicepublic void setTopologySize(int s)
setTopologySize in interface DHTServicepublic java.math.BigInteger getTopologySize()
DHTService
getTopologySize in interface DHTServicepublic java.math.BigInteger getNodeID(java.lang.String id)
DHTService
getNodeID in interface DHTServicepublic java.math.BigInteger[] mapNodeToCoord(java.math.BigInteger nid)
public void bootstrap(java.lang.String peerID)
bootstrap in interface DHTServicepublic void discoveryEvent(net.jxta.discovery.DiscoveryEvent e)
discoveryEvent in interface net.jxta.discovery.DiscoveryListenerpublic void join(java.math.BigInteger bi)
public void join(java.lang.String bootstrap)
join in interface DHTServicepublic void blockOnSend()
public void notifyReceived(Zone z)
public void notifyReceived()
public boolean inMyZone(QueryMessage qm)
inMyZone in interface CANServicepublic Zone splitZone(QueryMessage qm)
public void lookup(java.math.BigInteger target,
int owner,
int mode)
lookup in interface DHTServicepublic void routeTo(QueryMessage qm)
public void put(java.lang.String key,
java.lang.String value)
put in interface DHTServicepublic void get(java.lang.String key)
get in interface DHTServicepublic void receivedDHTEntry(QueryMessage query)
|
${header} | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||