nenok.lc.alloc
Class Default
java.lang.Object
nenok.lc.alloc.Default
- All Implemented Interfaces:
- Allocator
public class Default
- extends Object
- implements Allocator
This is a default implementation of a dynamic processor allocation model.
To determine the processor to allocation to a given node, this model only
considers the allocation of the node's parents.
- Version:
- 1.1
- Author:
- Marc Pouly
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Default
public Default(Processor proc)
- Constructor:
- Parameters:
proc
- The processor that is allocated to leaf nodes.
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()
totalCosts
public int totalCosts()
- Specified by:
totalCosts
in interface Allocator
- Returns:
- Returns the total communication costs caused so far.
- See Also:
Allocator.totalCosts()