|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object Thread Sim_entity ReplicaManager SimpleReplicaManager
public class 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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class ReplicaManager |
---|
outputPort_, policy_, rcID_, resIdObj_, resourceID_, storageList_ |
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 ReplicaManager |
---|
contains, contains, deregisterDeletedFile, getTotalStorageCapacity, init, processEndSimulation, registerFile, registerFile, setReplicaCatalogue, setReplicaCatalogue |
Methods inherited from class Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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
ParameterException
- This happens when one of the following scenarios occur:
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 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |