|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorca.cod.control.IdControlChange
orca.cod.control.BestFitIdControlChange
public class BestFitIdControlChange
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class orca.cod.control.IdControlChange |
|---|
IdControlChange.ControlState |
| Field Summary | |
|---|---|
protected java.util.Hashtable<ID,Machine> |
machines
Hashtable of machines keyed by their id |
| Fields inherited from class orca.cod.control.IdControlChange |
|---|
actor, authority, calendar, guid, identifiers, IndexBandwidth, IndexCpu, IndexMemory, IndexStorage, inplace, lazyClose, logger, machinesFailed, machinesFree, machinesHosting, migrations, nodes, PropertyBandwidth, PropertyCpu, PropertyDimensions, PropertyGuid, PropertyMaxPrefix, PropertyMemory, PropertyNamePrefix, PropertyResourceType, PropertyStorage, restores, saves, type |
| Constructor Summary | |
|---|---|
BestFitIdControlChange()
|
|
| Method Summary | |
|---|---|
protected void |
addToList(Machine entry,
java.util.ArrayList<Machine> list)
Add an entry to the linked list |
protected NodeGroup |
allocateNodes(java.util.Vector<ID> ids,
long[] shares,
AuthorityReservation reservation)
Allocates new nodes |
protected void |
attachUpdate(Node n)
|
ResourceSet |
correctFailed(ResourceSet rset)
|
protected Node |
createNode(long[] capacity,
ID id,
Machine m)
|
void |
donate(ResourceSet set)
Note: must be able to handle multiple donates of the same resources |
protected void |
fixOrder(java.util.ArrayList<Machine> list,
Machine entry)
|
protected long[] |
getAvailable(long[] shares,
int count)
|
protected Machine |
getLogicalHost(ID id)
Obtain a machine for this logical id. |
protected java.util.Hashtable<ID,orca.cod.control.BestFitIdControlChange.CountHelper> |
getLogicallyHosted(NodeSet nset)
|
protected long[] |
getMinSpareSharesPerHostedNode(java.util.Hashtable<ID,orca.cod.control.BestFitIdControlChange.CountHelper> table)
|
protected java.util.Hashtable<ID,orca.cod.control.BestFitIdControlChange.CountHelper> |
getPhysicallyHosted(NodeSet nset)
|
protected boolean |
handleChangedIds(NodeSet nodes,
java.util.Vector<ID> ids,
long[] currentShares,
AuthorityReservation reservation)
|
protected void |
migrateMachines(NodeSet nset,
AuthorityReservation r)
|
protected boolean |
migrateNodes(NodeSet nset)
Migrates the nodes from the NodeSet to their logical machines. |
protected int |
migrateNodesFromMachine(Machine machine)
Migrate all VMs hosted on this machine that do not belong to the given reservation. |
protected long[] |
min(long[] a,
long[] b)
|
protected NodeGroup |
modify(AuthorityReservation r,
NodeSet nset,
long[] capacity,
long[] currentCapacity)
|
protected boolean |
pendingRestore(AuthorityReservation r)
Checks if nodes in this reservation need to be restored |
protected void |
release(Node node,
boolean remove)
|
protected void |
release(Node node,
boolean remove,
boolean unmapLogical,
boolean removeFromNodes)
|
protected void |
releaseMigrated(Node node)
Cannot release logical parts because just migrating the machine. |
protected void |
releaseNoIds(Node node)
|
protected void |
releaseResized(Node n)
|
protected void |
releaseSaved(Node n)
|
protected void |
removeFromList(Machine entry,
java.util.ArrayList<Machine> list)
Remove the entry from the linked list |
| Methods inherited from class orca.cod.control.IdControlChange |
|---|
assign, available, calculateChanges, checkLazyClose, configure, convert, correctDeficit, dumpStats, eject, fail, findIndex, forceClose, freed, getDb, getGrowing, getGuid, getIdentifiers, getIds, getInUse, getMachine, getMachineForNodeRevisit, getNewIds, getReservation, getShares, getShares, getState, getToModify, getTypes, handleChangedIds, handleRelease, hasChanged, initialize, inProgress, isExpired, modify, release, release, release, releaseClosed, reserveHostSharesRevisit, reset, revisit, revisit, revisitModify, save, save, selectExtract, selectExtract, setActor, setShares, setShares, setType, subtract, unavailable, zero |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Hashtable<ID,Machine> machines
| Constructor Detail |
|---|
public BestFitIdControlChange()
| Method Detail |
|---|
public void donate(ResourceSet set)
throws java.lang.Exception
IdControlChange
donate in interface IResourceControldonate in class IdControlChangejava.lang.Exception
protected NodeGroup allocateNodes(java.util.Vector<ID> ids,
long[] shares,
AuthorityReservation reservation)
throws java.lang.Exception
IdControlChange
allocateNodes in class IdControlChangeids - list of logical ids to useshares - resource sharesreservation - for which reservation
java.lang.Exception - if an error occurs
protected NodeGroup modify(AuthorityReservation r,
NodeSet nset,
long[] capacity,
long[] currentCapacity)
throws java.lang.Exception
java.lang.Exception
protected boolean handleChangedIds(NodeSet nodes,
java.util.Vector<ID> ids,
long[] currentShares,
AuthorityReservation reservation)
throws java.lang.Exception
java.lang.Exception
protected boolean pendingRestore(AuthorityReservation r)
throws java.lang.Exception
pendingRestore in class IdControlChanger - the reservation
java.lang.Exception
protected void releaseMigrated(Node node)
throws java.lang.Exception
releaseMigrated in class IdControlChangenode -
java.lang.Exception
protected void releaseSaved(Node n)
throws java.lang.Exception
releaseSaved in class IdControlChangejava.lang.Exception
protected void releaseResized(Node n)
throws java.lang.Exception
releaseResized in class IdControlChangejava.lang.Exception
protected void release(Node node,
boolean remove)
throws java.lang.Exception
release in class IdControlChangejava.lang.Exception
protected void releaseNoIds(Node node)
throws java.lang.Exception
java.lang.Exception
protected void release(Node node,
boolean remove,
boolean unmapLogical,
boolean removeFromNodes)
throws java.lang.Exception
java.lang.Exception
protected Machine getLogicalHost(ID id)
throws java.lang.Exception
java.lang.Exception
protected int migrateNodesFromMachine(Machine machine)
throws java.lang.Exception
machine - r - gained -
java.lang.Exceptionprotected boolean migrateNodes(NodeSet nset)
nset -
protected void migrateMachines(NodeSet nset,
AuthorityReservation r)
throws java.lang.Exception
java.lang.Exceptionprotected java.util.Hashtable<ID,orca.cod.control.BestFitIdControlChange.CountHelper> getLogicallyHosted(NodeSet nset)
protected java.util.Hashtable<ID,orca.cod.control.BestFitIdControlChange.CountHelper> getPhysicallyHosted(NodeSet nset)
protected long[] getAvailable(long[] shares,
int count)
protected long[] getMinSpareSharesPerHostedNode(java.util.Hashtable<ID,orca.cod.control.BestFitIdControlChange.CountHelper> table)
protected long[] min(long[] a,
long[] b)
protected void attachUpdate(Node n)
protected Node createNode(long[] capacity,
ID id,
Machine m)
protected void removeFromList(Machine entry,
java.util.ArrayList<Machine> list)
entry -
protected void addToList(Machine entry,
java.util.ArrayList<Machine> list)
entry -
protected void fixOrder(java.util.ArrayList<Machine> list,
Machine entry)
public ResourceSet correctFailed(ResourceSet rset)
throws java.lang.Exception
correctFailed in interface IResourceControlcorrectFailed in class IdControlChangejava.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||