nenok.alloc
Class Random
java.lang.Object
nenok.alloc.Random
- All Implemented Interfaces:
- Allocator
public class Random
- extends Object
- implements Allocator
This is a random processor allocation model. From the existing set of processor,
we assign a random processor to all node that initially posses an identity locator.
- Version:
- $LastChangedRevision: 553 $
$LastChangedDate: 2008-03-26 14:18:45 +0100 (Mi, 26 Mrz 2008) $
- Author:
- Marc Pouly
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Random
public Random(Set<Uuid> pids)
- Constructor:
- Parameters:
pids
- The set of existing processors.
allocate
public void allocate(Node node)
throws RemoteException
- Description copied from interface:
Allocator
- Dynamic allocation procedure. Allocates a processor to the node given as argument.
This method is called from the collect algorithm for each node strictly before any
computations are executed onto this node. Note: Static allocation is not possible
with this method. To do so, we recomment to implement a corresponding constructor
and to provide an empty implementation of this method.
- Specified by:
allocate
in interface Allocator
- Parameters:
node
- The current node to which a processor needs to be allocated.
- Throws:
RemoteException
- Communication exception caused by accessing processors.- See Also:
Allocator.allocate(nenok.lc.Node)
getName
public String getName()
- Specified by:
getName
in interface Allocator
- Returns:
- The name of this processor allocation model.
- See Also:
Allocator.getName()