orca.policy.core.util
Class AllotmentTable

java.lang.Object
  extended by orca.policy.core.util.AllotmentTable

public class AllotmentTable
extends java.lang.Object


Field Summary
protected  java.util.Hashtable<ID,AllotmentEntry> allotment
          The set of machines that this request has units alloted from
 
Constructor Summary
AllotmentTable(long startTime, long endTime)
          Constructor.
 
Method Summary
 void addEntry(AllotmentEntry entry)
          Add an entry to the allotment
 long[] findMaxResources(long[] minResources, long[] resourceLimit)
          Determine the max amount of resources that can be allocated to a request.
 long[] findMinAvailable(int dimensions)
           
 java.util.Hashtable<ID,AllotmentEntry> getAllotment()
          Return the hashtable of the allotments
 java.lang.String getIdentifiers()
           
 java.util.Iterator iterator()
          Retun an iterator
 void mergeAllotments(AllotmentTable merge)
           
 void preCommit(long[] shares)
           
 int totalUnits()
          Determine the total number of units that have been allocated across the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allotment

protected java.util.Hashtable<ID,AllotmentEntry> allotment
The set of machines that this request has units alloted from

Constructor Detail

AllotmentTable

public AllotmentTable(long startTime,
                      long endTime)
Constructor.

Parameters:
startTime -
endTime -
Method Detail

addEntry

public void addEntry(AllotmentEntry entry)
Add an entry to the allotment

Parameters:
entry -

findMaxResources

public long[] findMaxResources(long[] minResources,
                               long[] resourceLimit)
Determine the max amount of resources that can be allocated to a request. First determine the most amount of growth per unit the machines can handle, and then decide on the max resources to be granted.

Returns:
maxResources

findMinAvailable

public long[] findMinAvailable(int dimensions)

mergeAllotments

public void mergeAllotments(AllotmentTable merge)

totalUnits

public int totalUnits()
Determine the total number of units that have been allocated across the table

Returns:

getIdentifiers

public java.lang.String getIdentifiers()

preCommit

public void preCommit(long[] shares)

iterator

public java.util.Iterator iterator()
Retun an iterator

Returns:

getAllotment

public java.util.Hashtable<ID,AllotmentEntry> getAllotment()
Return the hashtable of the allotments

Returns:


Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.