adjusting
Class Adjuster
java.lang.Object
adjusting.Adjuster
- All Implemented Interfaces:
- java.io.Serializable
public class Adjuster
- extends java.lang.Object
- implements java.io.Serializable
This class provides the following services: 1) Calculating the proper ratios
when imposing heterogeneity 2) Determining if a failure happens for a server
during a particular period 3) Determining if a particular Server object is
suffering from a failure.
- Author:
- Majd Kokaly
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Adjuster
public Adjuster()
getRatio
public static double getRatio(JobClass jobClass,
Server server)
- For the Loop processes that is constructed from 4 loops. there is the
iteration value that determine how many iteration each of the most three
inner loops should execute. Every server has a real execution rate for
such a process. Because sometimes heterogeneity is imposed. We want to
increase or decrease the execution time as to be able to change the rate
(assumed rate). This method returns the ratio between the real rate and
the assumed rate. Please refer to the Appendix D from the Thesis
document.
- Parameters:
jobClass
- Is the class that the ratio is to be calculated for.server
- The Server object that will execute the task.
- Returns:
- a double value of the ratio that should be used according the
execution rates.
- See Also:
Server
didAFailureHappen
public static boolean didAFailureHappen(java.util.GregorianCalendar startTime,
java.util.GregorianCalendar endTime,
Server server)
- Parameters:
startTime
- is a time object.endTime
- is a time object.server
- is a Server object.
- Returns:
- true if a artificial failure happens between the start time and
end time for Server "server" and false otherwise.
- See Also:
FailureTrace
,
Server
isServerSufferingFromAFailure
public static boolean isServerSufferingFromAFailure(java.util.GregorianCalendar now,
Server server)
- Parameters:
now
- is time object. Usually resembles the current time.server
- Is a Server object.
- Returns:
- True if Server "server" is suffering from an artificial failure,
false otherwise.
- See Also:
FailureTrace
getEndOFFailurePeriod
public static java.util.GregorianCalendar getEndOFFailurePeriod(java.util.GregorianCalendar now,
Server server)
- Parameters:
now
- Is time object. Usually resembles the current time.server
- Is a Server object.
- Returns:
- The time when the artificial failure period is ended if there is
a failure period and null otherwise.
- See Also:
FailureTrace