Class DecisionHistory

  • All Implemented Interfaces:
    java.io.Serializable

    public final class DecisionHistory
    extends java.lang.Object
    implements java.io.Serializable
    This 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 int DECISION_LIFETIME
      The 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
      void expireAndMeasureImprovements​(Monitor mon)
      Measures the improvement in utilization of any resource for which a decision was recently made.
      static DecisionHistory load​(java.io.InputStream is)
      Synchronize the decision history with the persistent version, from the given stream.
      static DecisionHistory loadFromFile​(java.lang.String path)
      Synchronize the decision history with the persistent version.
      void recordProcessorMove​(com.sun.solaris.domain.pools.ComponentMove move, double startingUtilization, int sampleCount)
      Record a decision that's been made regarding a processor.
      void sync​(java.io.OutputStream os)
      Serialize the persistent decision history to the given stream.
      void syncToFile​(java.lang.String path)
      Synchronize the persistent decision history with the present history.
      java.lang.String toString()  
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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
    • Constructor Detail

      • DecisionHistory

        public DecisionHistory()
        Constructor.
    • Method Detail

      • recordProcessorMove

        public void recordProcessorMove​(com.sun.solaris.domain.pools.ComponentMove move,
                                        double startingUtilization,
                                        int sampleCount)
                                 throws PoolsException
        Record 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.IOException
        java.lang.ClassNotFoundException
      • syncToFile

        public void syncToFile​(java.lang.String path)
                        throws java.io.IOException
        Synchronize 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.IOException
        java.lang.ClassNotFoundException
      • sync

        public void sync​(java.io.OutputStream os)
                  throws java.io.IOException
        Serialize the persistent decision history to the given stream.
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • expireAndMeasureImprovements

        public void expireAndMeasureImprovements​(Monitor mon)
        Measures the improvement in utilization of any resource for which a decision was recently made.