|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpulling.availability_predection.AvailabilityManager
public class AvailabilityManager
This thread is responsible for measuring the Usage of the server, updating the history file and letting the Mapper know when the node is idle. This Thread uses the AvailabilityLogger to access the history file.
Field Summary | |
---|---|
static int |
RECURSIVE
Is one mode of operation. |
static int |
WEIGHTED_MEAN
Is one mode of operation. |
Constructor Summary | |
---|---|
AvailabilityManager()
The default constructor |
|
AvailabilityManager(int timeresolution,
java.lang.String mapperHostName)
|
|
AvailabilityManager(int timeresolution,
java.lang.String mapperHostName,
double c)
|
|
AvailabilityManager(int timeresolution,
java.lang.String mapperHostName,
double[] weights)
|
|
AvailabilityManager(int timeresolution,
java.lang.String mapperHostName,
int mode)
|
Method Summary | |
---|---|
int |
getAvailablityPort()
|
double |
getAverage()
This method returns the average of the readings elements ignoring UNKOWN elements |
double |
getC()
|
double |
getEstimatedAvailability(java.util.GregorianCalendar calendar)
Please refer to Section Availability Model in the thesis document. |
pulling.availability_predection.AvailabilityLogger |
getLogger()
|
java.lang.String |
getMapperHostName()
|
int |
getMode()
|
int |
getPastReadingsCount()
|
double |
getPreviousEstimation()
|
int |
getReadingFrequency()
|
int |
getTimeresolution()
|
double[] |
getWeights()
|
void |
initReadings()
Set every element in the reading array to be unknown |
boolean |
isAlive()
|
boolean |
isDistributedReadingsMode()
|
void |
notifyMapperWithThenNewAvailability(double availability)
This method notifies Mapper with the availability. |
void |
print()
|
static void |
print(java.util.GregorianCalendar cal)
|
void |
printAllTimeIntervals()
|
void |
run()
|
void |
setAlive(boolean alive)
|
void |
setAvailablityPort(int availablityPort)
|
void |
setC(double c)
|
void |
setDistributedReadingsMode(boolean distributedReadingsMode)
|
void |
setLogger(pulling.availability_predection.AvailabilityLogger logger)
|
void |
setMapperHostName(java.lang.String mapperHostName)
|
void |
setMode(int mode)
|
void |
setPreviousEstimation(double previousEstimation)
|
void |
setReadingFrequency(int readingFrequency)
|
void |
setTimeresolution(int timeresolution)
|
void |
setWeights(double[] weights)
|
void |
startThread()
This method starts the Thread |
void |
stopThread()
This method stops the Thread |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int WEIGHTED_MEAN
public static int RECURSIVE
Constructor Detail |
---|
public AvailabilityManager()
public AvailabilityManager(int timeresolution, java.lang.String mapperHostName)
public AvailabilityManager(int timeresolution, java.lang.String mapperHostName, int mode)
public AvailabilityManager(int timeresolution, java.lang.String mapperHostName, double c)
public AvailabilityManager(int timeresolution, java.lang.String mapperHostName, double[] weights)
Method Detail |
---|
public void startThread()
public void stopThread()
public pulling.availability_predection.AvailabilityLogger getLogger()
public void setLogger(pulling.availability_predection.AvailabilityLogger logger)
public boolean isAlive()
public void setAlive(boolean alive)
public boolean isDistributedReadingsMode()
public void setDistributedReadingsMode(boolean distributedReadingsMode)
public int getTimeresolution()
public void setTimeresolution(int timeresolution)
public int getReadingFrequency()
public void setReadingFrequency(int readingFrequency)
public java.lang.String getMapperHostName()
public void setMapperHostName(java.lang.String mapperHostName)
public int getAvailablityPort()
public void setAvailablityPort(int availablityPort)
public int getMode()
public void setMode(int mode)
public int getPastReadingsCount()
public double[] getWeights()
public void setWeights(double[] weights)
public double getC()
public void setC(double c)
public double getPreviousEstimation()
public void setPreviousEstimation(double previousEstimation)
public void initReadings()
public double getAverage()
public double getEstimatedAvailability(java.util.GregorianCalendar calendar)
calendar
- is the time for which the estimation is desired
public void run()
run
in interface java.lang.Runnable
public static void print(java.util.GregorianCalendar cal)
public void printAllTimeIntervals()
public void notifyMapperWithThenNewAvailability(double availability) throws java.net.UnknownHostException
availability
- The new aj value.
java.net.UnknownHostException
public java.lang.String toString()
toString
in class java.lang.Object
public void print()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |