org.objectweb.proactive.core.body.future
Class FutureMap

java.lang.Object
  extended by org.objectweb.proactive.core.body.future.FutureMap
All Implemented Interfaces:
java.io.Serializable

public class FutureMap
extends java.lang.Object
implements java.io.Serializable

Data structure which stores futures and corresponding automatic continuation to do. This map is like : [creatorID --> [sequenceID --> {list of futures to update, list of bodies for AC}]]

See Also:
FuturePool, FutureProxy, Serialized Form

Constructor Summary
FutureMap()
           
 
Method Summary
 void addAutomaticContinuation(long id, UniqueID creatorID, UniversalBody bodyDest)
          Add an AC to do for bodyDest when the futurPool will receive the value of the future indexed by (id, creatorID)
 java.util.ArrayList getAutomaticContinuation(long id, UniqueID bodyID)
          Return the list of ACs to (ie bodies destination) corresponding to (id,bodyID) if any, null otherwise.
 java.util.ArrayList getFuturesToUpdate(long id, UniqueID creatorID)
          Return the list of futures corresponding to (id,bodyID) if any, null otherwise.
 void receiveFuture(Future futureObject)
          Add a future (id, creatorID) in the map.
 void removeFutures(long id, UniqueID creatorID)
          Remove entry corresponding to (id, creatorID) in the futureMap.
 void setMigrationTag()
          Set the migration tag in all futures of the map.
 void unsetMigrationTag()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FutureMap

public FutureMap()
Method Detail

addAutomaticContinuation

public void addAutomaticContinuation(long id,
                                     UniqueID creatorID,
                                     UniversalBody bodyDest)
Add an AC to do for bodyDest when the futurPool will receive the value of the future indexed by (id, creatorID)

Parameters:
id - sequence id of the future
creatorID - UniqueID of the creator body of the future
bodyDest - body which receives the future (id, bodyID)

receiveFuture

public void receiveFuture(Future futureObject)
Add a future (id, creatorID) in the map. The entry for this key could already exists, because a body can have copies of a future.

Parameters:
futureObject - future to register

getFuturesToUpdate

public java.util.ArrayList getFuturesToUpdate(long id,
                                              UniqueID creatorID)
Return the list of futures corresponding to (id,bodyID) if any, null otherwise.

Parameters:
id - sequence id of the future
creatorID - UniqueID of the creator body of the future

getAutomaticContinuation

public java.util.ArrayList getAutomaticContinuation(long id,
                                                    UniqueID bodyID)
Return the list of ACs to (ie bodies destination) corresponding to (id,bodyID) if any, null otherwise.

Parameters:
id - sequence id of the future
bodyID - UniqueID of the creator body of the future

removeFutures

public void removeFutures(long id,
                          UniqueID creatorID)
Remove entry corresponding to (id, creatorID) in the futureMap.

Parameters:
id - sequence id of the future
creatorID - UniqueID of the creator body of the future

unsetMigrationTag

public void unsetMigrationTag()

setMigrationTag

public void setMigrationTag()
Set the migration tag in all futures of the map.

See Also:
FutureProxy


Copyright 2001-2007 INRIA All Rights Reserved.