Package com.sun.solaris.domain.pools
Interface Solver
-
public interface Solver
This interface specifies the contract between poold and the poold allocation algorithms.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
examine(Monitor mon)
Evaluate whether a workload based reconfiguration is required.Monitor
getMonitor()
Return a reference to the monitor which this solver is using to provide statistics about the configuration which is to be solved.java.util.Set
getObjectives(Element elem)
Return the set of objectives associated with the supplied element.void
initialize(Configuration conf)
Initialize the solver.boolean
isValid()
Return true if all examined resources are capable of providing statistically valid data.boolean
solve()
Allocate resources.
-
-
-
Method Detail
-
initialize
void initialize(Configuration conf) throws PoolsException
Initialize the solver.- Parameters:
conf
- The configuration to be manipulated.- Throws:
PoolsException
- If the initialization fails.
-
examine
boolean examine(Monitor mon) throws PoolsException, com.sun.solaris.domain.pools.StaleMonitorException
Evaluate whether a workload based reconfiguration is required.- Parameters:
mon
- The monitor to be used during examination.- Throws:
PoolsException
- If the examination fails.com.sun.solaris.domain.pools.StaleMonitorException
- If the monitor is stale.
-
solve
boolean solve() throws java.lang.Exception
Allocate resources. Return true if a change was made.- Throws:
java.lang.Exception
- If the solve fails.
-
isValid
boolean isValid()
Return true if all examined resources are capable of providing statistically valid data. If any of the monitored resources have not accumulated enough data to be statistically significant, then this monitor is not ready to be used to obtain data for all resources. In this case, false is returned.
-
getMonitor
Monitor getMonitor()
Return a reference to the monitor which this solver is using to provide statistics about the configuration which is to be solved.
-
getObjectives
java.util.Set getObjectives(Element elem)
Return the set of objectives associated with the supplied element.- Parameters:
elem
- Retrieve objectives for this element.
-
-