|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.p2p.service.P2PService
public class P2PService
ProActive Peer-to-Peer Service.
This class is made to be actived.
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 | |
---|---|
P2PService()
The empty constructor. |
Method Summary | |
---|---|
void |
askingNode(int ttl,
java.util.UUID uuid,
P2PService remoteService,
int numberOfNodes,
P2PNodeLookup lookup,
java.lang.String vnName,
java.lang.String jobId,
java.lang.String nodeFamilyRegexp)
Method automaticly forwarded by run activity if needed. |
void |
exploring(int ttl,
java.util.UUID uuid,
P2PService remoteService)
Method automaticly forwarded by run activity if needed. |
void |
firstContact(java.util.Vector peers)
Contact all specified peers to enter in the existing P2P network. |
java.util.Vector |
getAcquaintanceList()
|
StringWrapper |
getAddress()
For load balancing. |
Node |
getANode(java.lang.String vnName,
java.lang.String jobId)
For asking a single node to the p2p infrastructure. |
Node |
getANode(java.lang.String vnName,
java.lang.String jobId,
P2PService service)
***For internal use only*** |
static P2PService |
getLocalP2PService()
|
P2PNodeLookup |
getMaximunNodes(java.lang.String vnName,
java.lang.String jobId)
Put in a P2PNodeLookup all available nodes during all the
time where it is actived. |
P2PNodeLookup |
getNodes(int numberOfNodes,
java.lang.String vnName,
java.lang.String jobId)
Put in a P2PNodeLookup , the number of asked nodes. |
P2PNodeLookup |
getNodes(int numberOfNodes,
java.lang.String nodeFamilyRegexp,
java.lang.String vnName,
java.lang.String jobId)
Put in a P2PNodeLookup , the number of asked nodes. |
void |
heartBeat()
Just to test if the peer is alive. |
void |
initActivity(Body body)
Initializes the activity of the active object. |
void |
register(P2PService service)
Add the remote P2P service in the local acquaintances group if NOA is not yet reached. |
void |
removeWaitingAccessor(P2PNodeLookup accessorToRemove)
/** Remove a no more waiting nodes accessor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public P2PService()
ProActive
Method Detail |
---|
public void firstContact(java.util.Vector peers)
peers
- a list of peers URL.public void register(P2PService service)
service
- the remote P2P service.public void heartBeat()
public void exploring(int ttl, java.util.UUID uuid, P2PService remoteService)
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.public void askingNode(int ttl, java.util.UUID uuid, P2PService remoteService, int numberOfNodes, P2PNodeLookup lookup, java.lang.String vnName, java.lang.String jobId, java.lang.String nodeFamilyRegexp)
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
- public P2PNodeLookup getNodes(int numberOfNodes, java.lang.String nodeFamilyRegexp, java.lang.String vnName, java.lang.String jobId)
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.
public P2PNodeLookup getNodes(int numberOfNodes, java.lang.String vnName, java.lang.String jobId)
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.
public Node getANode(java.lang.String vnName, java.lang.String jobId)
vnName
- the virtual node name, cannot be null.jobId
- the job ID, cannot be null.
public Node getANode(java.lang.String vnName, java.lang.String jobId, P2PService service)
vnName
- the virtual node name, cannot be null.jobId
- the job ID., cannot be nullservice
- a stub on the requester
public P2PNodeLookup getMaximunNodes(java.lang.String vnName, java.lang.String jobId)
P2PNodeLookup
all available nodes during all the
time where it is actived.
vnName
- Virtual node name, cannot be null.jobId
- cannot be null
public StringWrapper getAddress()
public void removeWaitingAccessor(P2PNodeLookup accessorToRemove)
accessorToRemove
- the accessor to remove.public java.util.Vector getAcquaintanceList()
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 static P2PService getLocalP2PService() throws java.lang.Exception
java.lang.Exception
- no P2PService in this local JVM.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |