Package com.sun.solaris.domain.pools
Class DecisionHistory
- java.lang.Object
-
- com.sun.solaris.domain.pools.DecisionHistory
-
- All Implemented Interfaces:
java.io.Serializable
public final class DecisionHistory extends java.lang.Object implements java.io.SerializableThis class maintains history about previous decisions. It can be used to ratify that a decision made on the basis of observed behavior over a limited time was historically shown to not degrade performance. The class maintains historical data in a history file. The format of this data is project-private and very likely to change as the implementation improves.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intDECISION_LIFETIMEThe number of samples which a decision will be remembered.
-
Constructor Summary
Constructors Constructor Description DecisionHistory()Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexpireAndMeasureImprovements(Monitor mon)Measures the improvement in utilization of any resource for which a decision was recently made.static DecisionHistoryload(java.io.InputStream is)Synchronize the decision history with the persistent version, from the given stream.static DecisionHistoryloadFromFile(java.lang.String path)Synchronize the decision history with the persistent version.voidrecordProcessorMove(com.sun.solaris.domain.pools.ComponentMove move, double startingUtilization, int sampleCount)Record a decision that's been made regarding a processor.voidsync(java.io.OutputStream os)Serialize the persistent decision history to the given stream.voidsyncToFile(java.lang.String path)Synchronize the persistent decision history with the present history.java.lang.StringtoString()booleanveto(com.sun.solaris.domain.pools.Move m, double utilization)Vetoes a Move only if there is a prior decision that showed a degradation in resource utilization.
-
-
-
Field Detail
-
DECISION_LIFETIME
public static final int DECISION_LIFETIME
The number of samples which a decision will be remembered.- See Also:
- Constant Field Values
-
-
Method Detail
-
recordProcessorMove
public void recordProcessorMove(com.sun.solaris.domain.pools.ComponentMove move, double startingUtilization, int sampleCount) throws PoolsExceptionRecord a decision that's been made regarding a processor. Such a decision is a (cpuid, from-pset-name, to-pset-name, (from-pset-composition), (to-pset-composition), original-utilization-class) tuple.- Throws:
PoolsException
-
veto
public boolean veto(com.sun.solaris.domain.pools.Move m, double utilization)Vetoes a Move only if there is a prior decision that showed a degradation in resource utilization.
-
loadFromFile
public static DecisionHistory loadFromFile(java.lang.String path) throws java.io.IOException, java.lang.ClassNotFoundException
Synchronize the decision history with the persistent version.- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
syncToFile
public void syncToFile(java.lang.String path) throws java.io.IOExceptionSynchronize the persistent decision history with the present history.- Throws:
java.io.IOException
-
load
public static DecisionHistory load(java.io.InputStream is) throws java.io.IOException, java.lang.ClassNotFoundException
Synchronize the decision history with the persistent version, from the given stream.- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
sync
public void sync(java.io.OutputStream os) throws java.io.IOExceptionSerialize the persistent decision history to the given stream.- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
expireAndMeasureImprovements
public void expireAndMeasureImprovements(Monitor mon)
Measures the improvement in utilization of any resource for which a decision was recently made.
-
-