mapping.data
Class Job

java.lang.Object
  extended by mapping.data.Job
All Implemented Interfaces:
java.io.Serializable

public class Job
extends java.lang.Object
implements java.io.Serializable

This class represents a job in the system. It stores information like the ID of this job, submission date, etc..

Author:
Majd Kokaly
See Also:
Serialized Form

Field Summary
static java.lang.String DONE
          A final string representing the state Done
static int NOT_ASSIGNED
          final value used to express the fact a the job has not been assigned to a server yet.
static long NOT_DONE
          final value used to express the fact a the job has not been completed yet.
static long NOT_SENT
          final value used to express the fact a the job has not been sent yet.
static java.lang.String QUEUED
          A final string representing the state Queued.
static java.lang.String RUNNING
          A final string representing the state Running.
static java.lang.String TIMEDOUT
          A final string representing the state Timed-Out.
 
Constructor Summary
Job(int jobClassId, long iterations)
           
Job(int id, Server server)
           
Job(int id, Server server, double timeExpected)
           
Job(int index, Server server, double timeExpected, java.util.GregorianCalendar timeSubmitted)
           
Job(int id, Server server, java.util.GregorianCalendar timeSubmitted)
           
 
Method Summary
 long getIndex()
           
 long getIterations()
           
 double getTimeBetweenStartTimeAndSentTimeInSeconds()
           
 long getTimeBetweenSubmissionTimeAndDoneTimeInMilliSeconds()
           
 double getTimeBetweenSubmissionTimeAndDoneTimeInSeconds()
           
 double getTimeBetweenSubmissionTimeAndSentTimeInMilliSeconds()
           
 void print()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

QUEUED

public static final java.lang.String QUEUED
A final string representing the state Queued.

See Also:
Constant Field Values

RUNNING

public static final java.lang.String RUNNING
A final string representing the state Running.

See Also:
Constant Field Values

DONE

public static final java.lang.String DONE
A final string representing the state Done

See Also:
Constant Field Values

TIMEDOUT

public static final java.lang.String TIMEDOUT
A final string representing the state Timed-Out.

See Also:
Constant Field Values

NOT_ASSIGNED

public static final int NOT_ASSIGNED
final value used to express the fact a the job has not been assigned to a server yet.

See Also:
Constant Field Values

NOT_DONE

public static final long NOT_DONE
final value used to express the fact a the job has not been completed yet.

See Also:
Constant Field Values

NOT_SENT

public static final long NOT_SENT
final value used to express the fact a the job has not been sent yet.

See Also:
Constant Field Values
Constructor Detail

Job

public Job(int id,
           Server server,
           double timeExpected)
Parameters:
id - JOB ID in the system
server - ServerRecord object that this job was sent to
timeExpected - timeExpected for this job to be executed on the assigned server

Job

public Job(int id,
           Server server)

Job

public Job(int id,
           Server server,
           java.util.GregorianCalendar timeSubmitted)

Job

public Job(int index,
           Server server,
           double timeExpected,
           java.util.GregorianCalendar timeSubmitted)

Job

public Job(int jobClassId,
           long iterations)
Method Detail

getIndex

public long getIndex()

getIterations

public long getIterations()

toString

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

print

public void print()

getTimeBetweenSubmissionTimeAndDoneTimeInMilliSeconds

public long getTimeBetweenSubmissionTimeAndDoneTimeInMilliSeconds()

getTimeBetweenSubmissionTimeAndDoneTimeInSeconds

public double getTimeBetweenSubmissionTimeAndDoneTimeInSeconds()

getTimeBetweenSubmissionTimeAndSentTimeInMilliSeconds

public double getTimeBetweenSubmissionTimeAndSentTimeInMilliSeconds()

getTimeBetweenStartTimeAndSentTimeInSeconds

public double getTimeBetweenStartTimeAndSentTimeInSeconds()