org.objectweb.proactive.p2p.service.P2PService Class Reference

Inheritance diagram for org.objectweb.proactive.p2p.service.P2PService:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.proactive.p2p.service.P2PService:

Collaboration graph
[legend]
List of all members.

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 ()
 
Returns:
the list of current acquaintances.

void initActivity (Body body)
 
See also:
org.objectweb.proactive.InitActive.initActivity(org.objectweb.proactive.Body)


Static Public Member Functions

static P2PService getLocalP2PService () throws Exception
 
Returns:
the P2PService of this local JVM.


Detailed Description

ProActive Peer-to-Peer Service.

This class is made to be actived.

Author:
Alexandre di Costanzo

Definition at line 73 of file P2PService.java.


Constructor & Destructor Documentation

org.objectweb.proactive.p2p.service.P2PService.P2PService (  ) 

The empty constructor.

See also:
org.objectweb.proactive.ProActive

Definition at line 143 of file P2PService.java.


Member Function Documentation

void org.objectweb.proactive.p2p.service.P2PService.firstContact ( Vector  peers  ) 

Contact all specified peers to enter in the existing P2P network.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.
Returns:
the number of asked nodes.

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.

Parameters:
numberOfNodes the number of asked nodes.
vnName Virtual node name, cannot be null.
jobId of the vn, cannot be null.
Returns:
the number of asked nodes.

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.

Parameters:
vnName the virtual node name, cannot be null.
jobId the job ID, cannot be null.
Returns:
a free node.

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***

Parameters:
vnName the virtual node name, cannot be null.
jobId the job ID., cannot be null
service a stub on the requester
Returns:
a free node.

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.

Parameters:
vnName Virtual node name, cannot be null.
jobId cannot be null
Returns:
an active object where nodes are received.

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.

Returns:
URL of the node where the P2P service is running.

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.

Parameters:
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]

Returns:
the P2PService of this local JVM.

Exceptions:
Exception no P2PService in this local JVM.

Definition at line 674 of file P2PService.java.


The documentation for this class was generated from the following file:
Generated on Mon Jan 22 15:16:38 2007 for ProActive by  doxygen 1.5.1