Public Member Functions | |
P2PService () | |
The empty constructor. | |
void | firstContact (Vector peers) |
Contact all specified peers to enter in the existing P2P network. | |
void | register (P2PService service) |
Add the remote P2P service in the local acquaintances group if NOA is not yet reached. | |
void | heartBeat () |
Just to test if the peer is alive. | |
void | exploring (int ttl, UUID uuid, P2PService remoteService) |
Method automaticly forwarded by run activity if needed. | |
void | askingNode (int ttl, UUID uuid, P2PService remoteService, int numberOfNodes, P2PNodeLookup lookup, String vnName, String jobId, String nodeFamilyRegexp) |
Method automaticly forwarded by run activity if needed. | |
P2PNodeLookup | getNodes (int numberOfNodes, String nodeFamilyRegexp, String vnName, String jobId) |
Put in a P2PNodeLookup , the number of asked nodes. | |
P2PNodeLookup | getNodes (int numberOfNodes, String vnName, String jobId) |
Put in a P2PNodeLookup , the number of asked nodes. | |
Node | getANode (String vnName, String jobId) |
For asking a single node to the p2p infrastructure. | |
Node | getANode (String vnName, String jobId, P2PService service) |
***For internal use only*** | |
P2PNodeLookup | getMaximunNodes (String vnName, String jobId) |
Put in a P2PNodeLookup all available nodes during all the time where it is actived. | |
StringWrapper | getAddress () |
For load balancing. | |
void | removeWaitingAccessor (P2PNodeLookup accessorToRemove) |
/** Remove a no more waiting nodes accessor. | |
Vector | getAcquaintanceList () |
| |
void | initActivity (Body body) |
| |
Static Public Member Functions | |
static P2PService | getLocalP2PService () throws Exception |
|
This class is made to be actived.
Definition at line 73 of file P2PService.java.
org.objectweb.proactive.p2p.service.P2PService.P2PService | ( | ) |
The empty constructor.
Definition at line 143 of file P2PService.java.
void org.objectweb.proactive.p2p.service.P2PService.firstContact | ( | Vector | peers | ) |
Contact all specified peers to enter in the existing P2P network.
peers | a list of peers URL. |
Definition at line 155 of file P2PService.java.
Referenced by org.objectweb.proactive.p2p.service.StartP2PService.start(), and org.objectweb.proactive.core.descriptor.services.P2PDescriptorService.startService().
void org.objectweb.proactive.p2p.service.P2PService.register | ( | P2PService | service | ) |
Add the remote P2P service in the local acquaintances group if NOA is not yet reached.
service | the remote P2P service. |
Definition at line 176 of file P2PService.java.
References org.objectweb.proactive.p2p.service.P2PAcquaintanceManager.add().
void org.objectweb.proactive.p2p.service.P2PService.exploring | ( | int | ttl, | |
UUID | uuid, | |||
P2PService | remoteService | |||
) |
Method automaticly forwarded by run activity if needed.
Using a random fonction to choose if this peer should be know by the remote peer or not.
ttl | Time to live of the message, in number of hops. | |
uuid | UUID of the message. | |
remoteService | The original sender. |
Definition at line 208 of file P2PService.java.
void org.objectweb.proactive.p2p.service.P2PService.askingNode | ( | int | ttl, | |
UUID | uuid, | |||
P2PService | remoteService, | |||
int | numberOfNodes, | |||
P2PNodeLookup | lookup, | |||
String | vnName, | |||
String | jobId, | |||
String | nodeFamilyRegexp | |||
) |
Method automaticly forwarded by run activity if needed.
Booking a free node.
ttl | Time to live of the message, in number of hops. | |
uuid | UUID of the message. | |
remoteService | The original sender. | |
numberOfNodes | Number of asked nodes. | |
lookup | The P2P nodes lookup. | |
vnName | Virtual node name. | |
jobId |
Definition at line 253 of file P2PService.java.
References org.objectweb.proactive.p2p.service.node.P2PNode.getNode(), org.objectweb.proactive.core.node.Node.getNodeInformation(), org.objectweb.proactive.p2p.service.node.P2PNode.getNodeManager(), org.objectweb.proactive.core.node.Node.getProActiveRuntime(), org.objectweb.proactive.p2p.service.node.P2PNodeLookup.giveNode(), org.objectweb.proactive.p2p.service.node.P2PNodeLookup.giveNodeForMax(), org.objectweb.proactive.Service.hasRequestToServe(), org.objectweb.proactive.core.util.wrapper.IntWrapper.intValue(), org.objectweb.proactive.p2p.service.util.P2PConstants.MAX_NODE, org.objectweb.proactive.core.runtime.ProActiveRuntime.registerVirtualNode(), and org.objectweb.proactive.Service.serveAll().
P2PNodeLookup org.objectweb.proactive.p2p.service.P2PService.getNodes | ( | int | numberOfNodes, | |
String | nodeFamilyRegexp, | |||
String | vnName, | |||
String | jobId | |||
) |
Put in a P2PNodeLookup
, the number of asked nodes.
numberOfNodes | the number of asked nodes. | |
nodeFamilyRegexp | the regexp for the famili, null or empty String for all. | |
vnName | Virtual node name, cannot be null. | |
jobId | of the vn, cannot be null. |
Definition at line 389 of file P2PService.java.
References org.objectweb.proactive.p2p.service.util.P2PConstants.MAX_NODE.
P2PNodeLookup org.objectweb.proactive.p2p.service.P2PService.getNodes | ( | int | numberOfNodes, | |
String | vnName, | |||
String | jobId | |||
) |
Put in a P2PNodeLookup
, the number of asked nodes.
numberOfNodes | the number of asked nodes. | |
vnName | Virtual node name, cannot be null. | |
jobId | of the vn, cannot be null. |
Definition at line 438 of file P2PService.java.
References org.objectweb.proactive.p2p.service.node.P2PNodeLookup.getNodes().
Node org.objectweb.proactive.p2p.service.P2PService.getANode | ( | String | vnName, | |
String | jobId | |||
) |
For asking a single node to the p2p infrastructure.
There no warranties that a node will be returned.
vnName | the virtual node name, cannot be null. | |
jobId | the job ID, cannot be null. |
Definition at line 449 of file P2PService.java.
Referenced by org.objectweb.proactive.p2p.service.P2PService.getANode().
Node org.objectweb.proactive.p2p.service.P2PService.getANode | ( | String | vnName, | |
String | jobId, | |||
P2PService | service | |||
) |
***For internal use only***
vnName | the virtual node name, cannot be null. | |
jobId | the job ID., cannot be null | |
service | a stub on the requester |
Definition at line 460 of file P2PService.java.
References org.objectweb.proactive.p2p.service.P2PService.getANode(), org.objectweb.proactive.p2p.service.node.P2PNode.getNode(), org.objectweb.proactive.core.node.Node.getNodeInformation(), org.objectweb.proactive.core.node.Node.getProActiveRuntime(), org.objectweb.proactive.p2p.service.P2PAcquaintanceManager.randomPeer(), and org.objectweb.proactive.core.runtime.ProActiveRuntime.registerVirtualNode().
P2PNodeLookup org.objectweb.proactive.p2p.service.P2PService.getMaximunNodes | ( | String | vnName, | |
String | jobId | |||
) |
Put in a P2PNodeLookup
all available nodes during all the time where it is actived.
vnName | Virtual node name, cannot be null. | |
jobId | cannot be null |
Definition at line 493 of file P2PService.java.
References org.objectweb.proactive.p2p.service.node.P2PNodeLookup.getNodes().
StringWrapper org.objectweb.proactive.p2p.service.P2PService.getAddress | ( | ) |
For load balancing.
Definition at line 501 of file P2PService.java.
References org.objectweb.proactive.core.node.Node.getNodeInformation().
Referenced by org.objectweb.proactive.p2p.loadbalancer.P2PLoadBalancer.addToBalanceList(), and org.objectweb.proactive.p2p.loadbalancer.P2PLoadBalancer.addToStealList().
void org.objectweb.proactive.p2p.service.P2PService.removeWaitingAccessor | ( | P2PNodeLookup | accessorToRemove | ) |
/** Remove a no more waiting nodes accessor.
accessorToRemove | the accessor to remove. |
Definition at line 511 of file P2PService.java.
static P2PService org.objectweb.proactive.p2p.service.P2PService.getLocalP2PService | ( | ) | throws Exception [static] |
Exception | no P2PService in this local JVM. |
Definition at line 674 of file P2PService.java.