|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmapping.Mapper
public class Mapper
This class is the centre of operation to the software. The jobs table, servers table and the job classes table are data members of this class. Along with the MappingScheme this class is responsible for the mapping decisions. The jobs are submitted to this class.
Field Summary | |
---|---|
static long |
JOB_FAILED
This final long is used by the Mapping schemes when sending a job fails. |
static long |
JOB_FAILED_DUE_ACTUAL_ERROR
This final long is used by the Mapping schemes when sending a job fails due to actual error like communication error. |
static long |
JOB_SECONDARY_ID_NOT_KNOWN
This final long is used by the Mapping schemes when the secondary id is not known. |
Constructor Summary | |
---|---|
Mapper()
Default constructor |
Method Summary | |
---|---|
long |
cancelJob(long jobID_received,
int serverID)
|
double[][] |
constructActualMueMatrix()
|
double[][] |
constructMueMatrix()
This method returns the mue matrix as a double array. |
void |
fillActualProcessingRates()
This method calculate the actual rates for all servers but does not modify the assumed rates. |
void |
fillAllFailureTraces()
This method generates new FailureTrace objects for the servers. |
void |
fillAllFailureTraces(double failurePeriodsMean,
double upTimeMean)
This method generates new FailureTrace objects for the servers |
void |
fillProcessingRates()
This method calculate the actual rates for all servers and set the assumed rates the same as the actual ones. |
double |
getAssumedRate(int serverID,
int jobClassID)
|
IDsQueue<java.lang.Integer> |
getAvailableServersQueue()
|
boolean |
getcancelFlag()
|
JobClassesTable |
getClassesTable()
|
EndOfFailureAnnouncer |
getEndOfFailureAnnouncer()
|
Logger |
getErrorsLogger()
|
MapperSideExecuter |
getExecuter()
|
double |
getFailurePeriodsMean()
|
Logger |
getFailuresLogger()
|
JobClass |
getJobClass(int i)
|
long |
getjobID()
|
JobsTable |
getJobsTable()
|
java.lang.String |
getMapperHostName()
|
MappingScheme |
getMappingScheme()
|
double |
getRealRate(int serverID,
int jobClassID)
|
Server |
getServer(int i)
|
int[] |
getserverIDs()
|
ServersTable |
getServersTable()
|
java.util.GregorianCalendar |
getStartTime()
|
java.util.GregorianCalendar |
getStopTime()
|
double |
getTimeElapsedInTimeUnits()
|
TimeOutAnnouncer |
getTimeOutAnnouncer()
|
double |
getTimeOutFactor()
|
int |
getTimeResolution()
|
double |
getTimeUnitInMinutes()
|
double |
getUpTimePeriodsMean()
|
void |
initProcessingRates()
|
boolean |
isArtificialFailuresActive()
|
boolean |
isTimeOutActive()
|
void |
print()
|
void |
printAvailabilityQueue()
|
void |
printClasses()
|
void |
printServers()
|
void |
readMapperAsObjects(java.lang.String fileName)
Loads the definition of a mapper. |
void |
resetcancelFlag()
|
void |
resubmitJob(Job job)
This method is used to resubmit timed out job |
void |
saveMapperAsObjects(java.lang.String fileName)
This method saves the definitions on a file. |
void |
setArtificialFailuresActive(boolean artificialFailuresActive)
|
void |
setAssumedRate(int serverID,
int jobClassID,
double rate)
|
void |
setAvailableServersQueue(IDsQueue<java.lang.Integer> availableServersQueue)
|
void |
setcancelFlag(boolean CancelFlag,
int[] serverids,
long jobid)
|
void |
setClassesTable(JobClassesTable classesTable)
|
void |
setEndOfFailureAnnouncer(EndOfFailureAnnouncer endOfFailureAnnouncer)
|
void |
setErrorsLogger(Logger errorsLogger)
|
void |
setExecuter(MapperSideExecuter executer)
|
void |
setFailurePeriodsMean(double failurePeriodsMean)
|
void |
setFailuresLogger(Logger failuresLogger)
|
void |
setJobsTable(JobsTable jobsTable)
|
void |
setMappingScheme(MappingScheme mappingScheme)
|
void |
setRealRate(int serverID,
int jobClassID,
double rate)
|
void |
setServersTable(ServersTable serverstable)
|
void |
setTimeOutActive(boolean timeOutActive)
|
void |
setTimeOutAnnouncer(TimeOutAnnouncer timeOutAnnouncer)
|
void |
setTimeOutFactor(double timeOutFactor)
|
void |
setTimeResolution(int timeResolution)
|
void |
setTimeUnitInMinutes(double timeUnitInMinutes)
|
void |
setUpTimePeriodsMean(double upTimePeriodsMean)
|
void |
startMapper()
Starts the test and the mapping operation. |
void |
stopMapper()
Stops the test and the mapping operation. |
void |
submitJob(Job job)
This method is used by other modules to request jobs |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long JOB_FAILED
public static final long JOB_FAILED_DUE_ACTUAL_ERROR
public static final long JOB_SECONDARY_ID_NOT_KNOWN
Constructor Detail |
---|
public Mapper()
Method Detail |
---|
public java.lang.String getMapperHostName()
public boolean getcancelFlag()
public int[] getserverIDs()
public long getjobID()
public void setcancelFlag(boolean CancelFlag, int[] serverids, long jobid)
public void resetcancelFlag()
public MapperSideExecuter getExecuter()
public void setExecuter(MapperSideExecuter executer)
public ServersTable getServersTable()
public void setServersTable(ServersTable serverstable)
public JobClassesTable getClassesTable()
public void setClassesTable(JobClassesTable classesTable)
public JobsTable getJobsTable()
public void setJobsTable(JobsTable jobsTable)
public MappingScheme getMappingScheme()
public void setMappingScheme(MappingScheme mappingScheme)
public double getTimeUnitInMinutes()
public void setTimeUnitInMinutes(double timeUnitInMinutes)
public Logger getErrorsLogger()
public void setErrorsLogger(Logger errorsLogger)
public Logger getFailuresLogger()
public void setFailuresLogger(Logger failuresLogger)
public EndOfFailureAnnouncer getEndOfFailureAnnouncer()
public void setEndOfFailureAnnouncer(EndOfFailureAnnouncer endOfFailureAnnouncer)
public boolean isArtificialFailuresActive()
public void setArtificialFailuresActive(boolean artificialFailuresActive)
public TimeOutAnnouncer getTimeOutAnnouncer()
public void setTimeOutAnnouncer(TimeOutAnnouncer timeOutAnnouncer)
public boolean isTimeOutActive()
public void setTimeOutActive(boolean timeOutActive)
public double getTimeOutFactor()
public void setTimeOutFactor(double timeOutFactor)
public int getTimeResolution()
public void setTimeResolution(int timeResolution)
public IDsQueue<java.lang.Integer> getAvailableServersQueue()
public void setAvailableServersQueue(IDsQueue<java.lang.Integer> availableServersQueue)
public double getFailurePeriodsMean()
public void setFailurePeriodsMean(double failurePeriodsMean)
public double getUpTimePeriodsMean()
public void setUpTimePeriodsMean(double upTimePeriodsMean)
public java.util.GregorianCalendar getStartTime()
public java.util.GregorianCalendar getStopTime()
public void printServers()
public void printClasses()
public void submitJob(Job job)
job
- Job requestedpublic void resubmitJob(Job job)
job
- Job requestedpublic long cancelJob(long jobID_received, int serverID)
public java.lang.String toString()
toString
in class java.lang.Object
public void print()
public void printAvailabilityQueue()
public Server getServer(int i)
i
-
public double getAssumedRate(int serverID, int jobClassID)
public double getRealRate(int serverID, int jobClassID)
public void setAssumedRate(int serverID, int jobClassID, double rate)
public void setRealRate(int serverID, int jobClassID, double rate)
public JobClass getJobClass(int i)
public void initProcessingRates()
public void startMapper()
public void stopMapper()
public double getTimeElapsedInTimeUnits()
public void fillProcessingRates()
public void fillActualProcessingRates()
public void saveMapperAsObjects(java.lang.String fileName)
fileName
- The name of the file to be saved.public void readMapperAsObjects(java.lang.String fileName)
fileName
- public void fillAllFailureTraces(double failurePeriodsMean, double upTimeMean)
failurePeriodsMean
- The mean of all the failure periods.upTimeMean
- The mean of all the up-time periods.public void fillAllFailureTraces()
public double[][] constructMueMatrix()
public double[][] constructActualMueMatrix()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |