|
GridSim v4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectThread
eduni.simjava.Sim_entity
gridsim.datagrid.ReplicaManager
gridsim.datagrid.SimpleReplicaManager
This is a class which contains the basic functionality of a Replica Manager in a Data Grid. The current functionlity provided by this implementation includes the following:
DataGridlet
, i.e. transferring the
neccessary files to the local storage and pass the gridlet to the
AllocationPolicy for execution.
Field Summary |
Fields inherited from class gridsim.datagrid.ReplicaManager |
outputPort_, policy_, rcID_, resIdObj_, resourceID_, storageList_ |
Fields inherited from class eduni.simjava.Sim_entity |
|
Fields inherited from class Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
SimpleReplicaManager(String name,
String resourceName)
Creates a new Replica Manager object |
Method Summary | |
protected int |
addFile(File file)
Adds a file to the local storage. |
boolean |
addStorage(List storageList)
Adds a list of storage elements to the DataGrid resource |
boolean |
addStorage(Storage storage)
Adds a storage element to the DataGrid resource |
void |
body()
The main method of the data manager, which is responsible for managing all the incoming events. |
protected int |
deleteFile(String fileName)
Deletes a file from the local storage, and registers the change to the designated Replica Catalogue. |
protected File |
getFile(String fileName)
Gets a physical file based on its name |
boolean |
processEvent(Sim_event ev)
Processes an incoming event |
protected boolean |
receiveFileDelivery(File file)
A requested file has been delivered by another resource. |
protected void |
receiveReplicaLocation(Sim_event ev)
A location of the file is returned from the RC. |
void |
registerAllMasterFiles()
Registers all files (as master files) present on the storage(s) when GridSim is started. |
Methods inherited from class gridsim.datagrid.ReplicaManager |
contains, contains, deregisterDeletedFile, getTotalStorageCapacity, init, processEndSimulation, registerFile, registerFile, setReplicaCatalogue, setReplicaCatalogue |
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 SimpleReplicaManager(String name, String resourceName) throws ParameterException
name
- the name to be associated with this entityresourceName
- the name of the DataGrid resource
Exception
- This happens when one of the following scenarios occur:
ParameterException
GridSim.init(int, Calendar, boolean, String[], String[],
String)
Method Detail |
protected int addFile(File file)
addFile
in class ReplicaManager
file
- a file to be placed on the local resource
DataGridTags.FILE_ADD_SUCCESSFUL
,
DataGridTags.FILE_ADD_ERROR_STORAGE_FULL
public boolean addStorage(List storageList)
addStorage
in class ReplicaManager
storageList
- a list of storage elements to be added
public boolean addStorage(Storage storage)
addStorage
in class ReplicaManager
storage
- the storage element to be added
protected int deleteFile(String fileName)
deleteFile
in class ReplicaManager
fileName
- the filename of the file to be deleted.
DataGridTags.FILE_DELETE_SUCCESSFUL
,
DataGridTags.FILE_DELETE_ERROR_READ_ONLY
protected File getFile(String fileName)
getFile
in class ReplicaManager
fileName
- the file name to be retrieved
public void body()
body
in class Sim_entity
public boolean processEvent(Sim_event ev)
processEvent
in class ReplicaManager
public void registerAllMasterFiles()
registerAllMasterFiles
in class ReplicaManager
protected void receiveReplicaLocation(Sim_event ev)
ev
- a Sim_event objectprotected boolean receiveFileDelivery(File file)
file
- a File object
|
GridSim v4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |