|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sandev.TaskHeap.PlanCalculator.PlanCalculatorNodeDecl
org.sandev.TaskHeap.PlanCalculator.PlanCalculatorNodeBase
org.sandev.TaskHeap.PlanCalculator.PlanCalculatorNode
Implementation of the PlanCalculator node.
| Field Summary | |
protected org.sandev.basics.util.IDLookup |
idLookup
Our IDLookup instance used for retrieving plan component information not passed in with the PlanRecalc message. |
| Fields inherited from class org.sandev.TaskHeap.PlanCalculator.PlanCalculatorNodeDecl |
iDLookupInstanceName, recursionLevel |
| Fields inherited from interface org.sandev.basics.nodecommon.Controllable |
OPERATION_FAIL, OPERATION_RESUME, OPERATION_SHUTDOWN, OPERATION_STARTUP, OPERATION_STR_FAIL, OPERATION_STR_RESUME, OPERATION_STR_SHUTDOWN, OPERATION_STR_STARTUP, OPERATION_STR_SUSPEND, OPERATION_STR_UNDEFINED, OPERATION_STRINGS, OPERATION_SUSPEND, OPERATION_UNDEFINED, SHUTDOWN_ERROR_RESTART_GLOBAL, SHUTDOWN_ERROR_RESTART_LOCAL, SHUTDOWN_ERROR_TERMINATE, SHUTDOWN_NORMAL, STATE_FAILED, STATE_FAILING, STATE_RESUMING, STATE_RUNNING, STATE_STARTING, STATE_STOPPED, STATE_STOPPING, STATE_STR_FAILED, STATE_STR_FAILING, STATE_STR_RESUMING, STATE_STR_RUNNING, STATE_STR_STARTING, STATE_STR_STOPPED, STATE_STR_STOPPING, STATE_STR_SUSPENDED, STATE_STR_SUSPENDING, STATE_STR_UNDEFINED, STATE_STRINGS, STATE_SUSPENDED, STATE_SUSPENDING, STATE_UNDEFINED |
| Constructor Summary | |
PlanCalculatorNode()
|
|
| Method Summary | |
protected org.sandev.basics.structs.SandPersistMessage |
findIDInUpdates(long id,
org.sandev.basics.structs.SandUpdateMessage[] sums)
Find the specified id in the given updates and return it. |
org.sandev.basics.util.IDLookup |
getIDLookup()
initializing accessor for idLookup. |
protected long |
getTimeEstimateForID(long id,
org.sandev.basics.util.AuthUser user,
PlanRecalc pr,
org.sandev.basics.util.UserWorkLog uwl)
Given the ID of a PlanComponent, return the timeEstimate for it. |
org.sandev.basics.util.AuthUser |
getUserForID(long id)
Given a userID, return the AuthUser for it. |
PlanRecalc |
onReceive(PlanRecalc planRecalc)
Walk the PlanComponents. |
protected void |
onStartup()
When we startup, we ping the node we use for updates to make sure our support infrastructure is up. |
protected long |
recalculatePlan(Plan plan,
org.sandev.basics.util.AuthUser user,
PlanRecalc pr,
org.sandev.basics.util.UserWorkLog uwl)
Calculate the timeEstimate of the given plan, appending an update to the PlanRecalc if the estimate has changed. |
void |
setIDLookup(org.sandev.basics.util.IDLookup val)
mutator for idLookup |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected org.sandev.basics.util.IDLookup idLookup
| Constructor Detail |
public PlanCalculatorNode()
| Method Detail |
protected void onStartup()
throws org.sandev.basics.structs.SandException
onStartup in class PlanCalculatorNodeBaseorg.sandev.basics.structs.SandException
public PlanRecalc onReceive(PlanRecalc planRecalc)
throws org.sandev.basics.structs.SandException
Walk the PlanComponents. If this is a sequential plan, then add up the component time estimates, if it is parallel plan, then find the maximum component time estimate. For each plan component, recurse as necessary to get the time estimate.
onReceive in class PlanCalculatorNodeBaseorg.sandev.basics.structs.SandExceptionpublic org.sandev.basics.util.IDLookup getIDLookup()
public void setIDLookup(org.sandev.basics.util.IDLookup val)
protected long recalculatePlan(Plan plan,
org.sandev.basics.util.AuthUser user,
PlanRecalc pr,
org.sandev.basics.util.UserWorkLog uwl)
throws org.sandev.basics.structs.SandException
org.sandev.basics.structs.SandException
protected long getTimeEstimateForID(long id,
org.sandev.basics.util.AuthUser user,
PlanRecalc pr,
org.sandev.basics.util.UserWorkLog uwl)
throws org.sandev.basics.structs.SandException
org.sandev.basics.structs.SandException
protected org.sandev.basics.structs.SandPersistMessage findIDInUpdates(long id,
org.sandev.basics.structs.SandUpdateMessage[] sums)
public org.sandev.basics.util.AuthUser getUserForID(long id)
throws org.sandev.basics.structs.SandException
org.sandev.basics.structs.SandException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||