|
GridSim v3.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectThread
eduni.simjava.Sim_entity
gridsim.AllocPolicy
gridsim.ARPolicy
gridsim.ARSimpleSpaceShared
This is a resource scheduler that handles Advanced Reservation functionalities. This scheduler is also able to handle submitted jobs without reserving in the first place.
As this class name suggested, this scheduler is only able to handle some basic AR functionalities, such as:
There are some limitations on this scheduler:
GridSim,
ResourceCharacteristics| Field Summary |
| Fields inherited from class gridsim.ARPolicy |
MILLI_SEC |
| Fields inherited from class gridsim.AllocPolicy |
initTime_, myId_, outputPort_, resCalendar_, resId_, resName_, resource_, totalPE_ |
| Fields inherited from class eduni.simjava.Sim_entity |
|
| Fields inherited from class Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
ARSimpleSpaceShared(String resourceName,
String entityName)
Creates a new scheduler that handles advanced reservations. |
|
ARSimpleSpaceShared(String resourceName,
String entityName,
int commitPeriod)
Creates a new scheduler that handles advanced reservations. |
|
| Method Summary | |
void |
body()
Handles internal events that are coming to this entity. |
void |
gridletCancel(int gridletId,
int userId)
Cancels a Gridlet running in this entity. |
void |
gridletMove(int gridletId,
int userId,
int destId,
boolean ack)
Moves a Gridlet from this GridResource entity to a different one. |
void |
gridletPause(int gridletId,
int userId,
boolean ack)
Pauses a Gridlet only if it is currently executing. |
void |
gridletResume(int gridletId,
int userId,
boolean ack)
Resumes a Gridlet only in the paused list. |
int |
gridletStatus(int gridletId,
int userId)
Finds the status of a specified Gridlet ID. |
void |
gridletSubmit(Gridlet gl,
boolean ack)
Schedules a new Gridlet that has been received by the GridResource entity. |
void |
handleCancelReservation(int reservationID,
int senderID,
ArrayList list,
int sendTag)
Handles a cancel reservation request for a given Gridlet ID list. |
void |
handleCancelReservation(int reservationID,
int senderID,
int sendTag)
Handles a cancel reservation request. |
void |
handleCancelReservation(int reservationID,
int senderID,
int gridletID,
int sendTag)
Handles a cancel reservation request. |
void |
handleCommitOnly(int reservationID,
int senderID,
int sendTag)
Handles a commit reservation request. |
void |
handleCommitReservation(int reservationID,
int senderID,
int sendTag,
Gridlet gridlet)
Handles a commit reservation request. |
void |
handleCommitReservation(int reservationID,
int senderID,
int sendTag,
GridletList list)
Handles a commit reservation request. |
void |
handleCreateReservation(ARObject obj,
int senderID,
int sendTag)
Handles an advanced reservation request. |
void |
handleImmediateReservation(ARObject obj,
int senderID,
int sendTag)
Handles an immediate reservation request. |
void |
handleModifyReservation(ARObject obj,
int senderID,
int sendTag)
Handles a modify reservation request (NOTE: NOT YET SUPPORTED). |
void |
handleQueryBusyTime(long from,
long to,
int senderID,
int sendTag,
double userTimeZone)
Handles a query busy time request (NOTE: NOT YET SUPPORTED). |
void |
handleQueryFreeTime(long from,
long to,
int senderID,
int sendTag,
double userTimeZone)
Handles a query free time request (NOTE: NOT YET SUPPORTED). |
void |
handleQueryReservation(int reservationID,
int senderID,
int sendTag)
Handles a query reservation request. |
| Methods inherited from class gridsim.ARPolicy |
approxBusyTime, getCurrentTime, replyCancelReservation, replyCommitReservation, replyCreateReservation, replyModifyReservation, replyQueryReservation, replyTimeReservation, searchReservation |
| Methods inherited from class gridsim.AllocPolicy |
addTotalLoad, calculateTotalLoad, findGridlet, getTotalLoad, gridletMigrate, init, isEndSimulation, processOtherEvent, sendAck, sendCancelGridlet, sendFinishGridlet, sendInternalEvent, sendInternalEvent, setEndSimulation |
| Methods inherited from class eduni.simjava.Sim_entity |
add_generator, add_param, add_port, clone, get_id, get_name, get_port, get_port, get_stat, run, send_on, set_invisible, set_stat, sim_cancel, sim_completed, sim_current, sim_get_next, sim_get_next, sim_hold_for, sim_hold, sim_pause_for, sim_pause_for, sim_pause_until, sim_pause_until, sim_pause, sim_process_for, sim_process_for, sim_process_until, sim_process_until, sim_process, sim_putback, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_select, sim_trace, sim_wait_for, sim_wait_for, sim_wait_for, sim_wait, sim_waiting, sim_waiting |
| Methods inherited from class Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ARSimpleSpaceShared(String resourceName,
String entityName)
throws Exception
resourceName - the GridResource entity name that will contain
this allocation policyentityName - this object name. The name of this entity will
be "resourceName_entityName".
Exception - This happens when one of the following scenarios occur:
GridSim.init(int, Calendar, boolean),
GridSim.init(int, Calendar, boolean, String[], String[],
String)
public ARSimpleSpaceShared(String resourceName,
String entityName,
int commitPeriod)
throws Exception
resourceName - the GridResource entity name that will contain
this allocation policyentityName - this object name. The name of this entity will
be "resourceName_entityName".commitPeriod - a default commit period time for a user to commit
a reservation (unit is in second). NOTE: once it is
set, you can not change the time again.
Exception - This happens when one of the following scenarios occur:
GridSim.init(int, Calendar, boolean),
GridSim.init(int, Calendar, boolean, String[], String[],
String)| Method Detail |
public void handleModifyReservation(ARObject obj,
int senderID,
int sendTag)
handleModifyReservation in class ARPolicyobj - a reservation objectsenderID - a sender or user IDsendTag - a tag to send to the user
public void handleImmediateReservation(ARObject obj,
int senderID,
int sendTag)
handleImmediateReservation in class ARPolicyobj - a reservation objectsenderID - a sender or user IDsendTag - a tag to send the result back to user
public void handleCreateReservation(ARObject obj,
int senderID,
int sendTag)
handleCreateReservation in class ARPolicyobj - a reservation objectsenderID - a sender or user IDsendTag - a tag to send the result back to user
public void handleCancelReservation(int reservationID,
int senderID,
ArrayList list,
int sendTag)
handleCancelReservation in class ARPolicyreservationID - a reservation IDsenderID - a sender IDlist - a list of Gridlet IDssendTag - a tag to send the result back to user
public void handleCancelReservation(int reservationID,
int senderID,
int sendTag)
handleCancelReservation in class ARPolicyreservationID - a reservation IDsenderID - a sender IDsendTag - a tag to send the result back to user
public void handleCancelReservation(int reservationID,
int senderID,
int gridletID,
int sendTag)
handleCancelReservation in class ARPolicyreservationID - a reservation IDsenderID - a sender IDgridletID - a Gridlet IDsendTag - a tag to send the result back to user
public void handleQueryBusyTime(long from,
long to,
int senderID,
int sendTag,
double userTimeZone)
handleQueryBusyTime in class ARPolicyfrom - starting period timeto - ending period timesenderID - a sender or user IDsendTag - a tag to send to the user
public void handleQueryFreeTime(long from,
long to,
int senderID,
int sendTag,
double userTimeZone)
handleQueryFreeTime in class ARPolicyfrom - starting period timeto - ending period timesenderID - a sender or user IDsendTag - a tag to send to the user
public void handleCommitOnly(int reservationID,
int senderID,
int sendTag)
handleCommitReservation(int, int, int, Gridlet) or
handleCommitReservation(int, int, int, GridletList) method.
handleCommitOnly in class ARPolicyreservationID - a reservation IDsenderID - a sender or user IDsendTag - a tag to send to the user
public void handleCommitReservation(int reservationID,
int senderID,
int sendTag,
GridletList list)
handleCommitReservation in class ARPolicyreservationID - a reservation IDsenderID - a sender or user IDsendTag - a tag to send to the userlist - a list of Gridlet object
public void handleCommitReservation(int reservationID,
int senderID,
int sendTag,
Gridlet gridlet)
handleCommitReservation in class ARPolicyreservationID - a reservation IDsenderID - a sender or user IDsendTag - a tag to send to the usergridlet - a Gridlet object
public void handleQueryReservation(int reservationID,
int senderID,
int sendTag)
handleQueryReservation in class ARPolicyreservationID - a reservation IDsenderID - a sender or user IDsendTag - a tag to send to the userpublic void body()
body in class Sim_entity
public void gridletSubmit(Gridlet gl,
boolean ack)
gridletSubmit in class AllocPolicygl - a Gridlet object that is going to be executedack - an acknowledgement, i.e. true if wanted to know
whether this operation is success or not, false
otherwise (don't care)ResGridlet,
ResGridletList
public int gridletStatus(int gridletId,
int userId)
gridletStatus in class AllocPolicygridletId - a Gridlet IDuserId - the user or owner's ID of this Gridlet
Gridlet
public void gridletCancel(int gridletId,
int userId)
gridletCancel in class AllocPolicygridletId - a Gridlet IDuserId - the user or owner's ID of this Gridlet
public void gridletPause(int gridletId,
int userId,
boolean ack)
gridletPause in class AllocPolicygridletId - a Gridlet IDuserId - the user or owner's ID of this Gridletack - an acknowledgement, i.e. true if wanted to know
whether this operation is success or not, false
otherwise (don't care)
public void gridletMove(int gridletId,
int userId,
int destId,
boolean ack)
If a Gridlet has finished beforehand, then this method will send back the Gridlet to sender, i.e. the userId and sets the acknowledgment to false (if required).
gridletMove in class AllocPolicygridletId - a Gridlet IDuserId - the user or owner's ID of this GridletdestId - a new destination GridResource ID for this Gridletack - an acknowledgement, i.e. true if wanted to know
whether this operation is success or not, false
otherwise (don't care)
public void gridletResume(int gridletId,
int userId,
boolean ack)
gridletResume in class AllocPolicygridletId - a Gridlet IDuserId - the user or owner's ID of this Gridletack - an acknowledgement, i.e. true if wanted to know
whether this operation is success or not, false
otherwise (don't care)
|
GridSim v3.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||