|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.p2p.service.node.P2PNodeLookup
public class P2PNodeLookup
Field Summary |
---|
Fields inherited from interface org.objectweb.proactive.p2p.service.util.P2PConstants |
---|
HIDE_P2PNODE_MONITORING, MAX_NODE, P2P_NODE_NAME, PROPERPY_XML_PATH, PROPERTY_ACQUISITION, PROPERTY_EXPLORING_MSG, PROPERTY_LOOKUP_FREQ, PROPERTY_MSG_MEMORY, PROPERTY_MULTI_PROC_NODES, PROPERTY_NO_SHARING, PROPERTY_NOA, PROPERTY_NODES_ACQUISITION_T0, PROPERTY_PORT, PROPERTY_TTL, PROPERTY_TTU, SHARED_NODE_NAME, VN_NAME |
Constructor Summary | |
---|---|
P2PNodeLookup()
|
|
P2PNodeLookup(java.lang.Integer numberOfAskedNodes,
P2PService localP2pService,
java.lang.String vnName,
java.lang.String jobId,
java.lang.String nodeFamilyRegexp)
|
Method Summary | |
---|---|
boolean |
allArrived()
Check if all asked nodes are arrived. |
void |
endActivity(Body body)
Remove this nodes accessor from the waiting node accessors list in the local P2P service. |
java.util.Vector |
getAndRemoveNodes()
|
java.util.Vector |
getNodes()
Reurn all nodes asked. |
java.util.Vector |
getNodes(long timeout)
Reurn all nodes asked until the timeout. |
IntWrapper |
giveNode(Node givenNode,
P2PNodeManager remoteNodeManager)
Receipt a reference to a shared node. |
void |
giveNodeForMax(java.util.Vector<Node> givenNodes,
P2PNodeManager remoteNodeManager)
|
void |
initActivity(Body body)
Initializes the activity of the active object. |
boolean |
isActive()
Returns whether the node accessor is active or not. |
void |
killAllNodes()
Kill all received node. |
void |
killNode(java.lang.String node)
Kill the given node. |
void |
moveTo(java.lang.String nodeUrl)
Migrate the P2P node lookup tyo a new node. |
boolean |
nArrived(int n)
Check if n nodes are arrived. |
void |
runActivity(Body body)
Runs the activity of the active object. |
void |
wakeUp()
Wake up the active object, to send asking node message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public P2PNodeLookup()
public P2PNodeLookup(java.lang.Integer numberOfAskedNodes, P2PService localP2pService, java.lang.String vnName, java.lang.String jobId, java.lang.String nodeFamilyRegexp)
Method Detail |
---|
public boolean allArrived()
false
for asking all
available nodes.
true
if all asked nodes are arrived, false
else.public boolean nArrived(int n)
n
- number of needed nodes.
true
if n nodes are available, false
public void killNode(java.lang.String node)
node
- the node url to kill.public void killAllNodes()
Kill all received node.
Warning: if nodes are removed from the Collection, these nodes will be not kill.
public void wakeUp()
public IntWrapper giveNode(Node givenNode, P2PNodeManager remoteNodeManager)
givenNode
- the shared node.remoteNodeManager
- the remote node manager for the given node.
public void giveNodeForMax(java.util.Vector<Node> givenNodes, P2PNodeManager remoteNodeManager)
public boolean isActive()
Returns whether the node accessor is active or not. The nodes accessor is active as long as it has an associated thread running to serve the requests by calling methods on the active object and looking for asked nodes.
If the nodes accessor is not active, looking for nodes is stopped.
public java.util.Vector getAndRemoveNodes()
public java.util.Vector getNodes()
public java.util.Vector getNodes(long timeout)
timeout
- the timeout in milliseconds.
public void moveTo(java.lang.String nodeUrl)
nodeUrl
- the URL of the destination node.public void initActivity(Body body)
InitActive
initActivity
in interface InitActive
body
- the body of the active object being initializedInitActive.initActivity(org.objectweb.proactive.Body)
public void runActivity(Body body)
RunActive
runActivity
in interface RunActive
body
- the body of the active object being startedRunActive.runActivity(org.objectweb.proactive.Body)
public void endActivity(Body body)
endActivity
in interface EndActive
body
- the body of the active object being finalized.EndActive.endActivity(org.objectweb.proactive.Body)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |