public interface Storage
| Modifier and Type | Method and Description |
|---|---|
double |
addFile(File file)
Adds a file to the storage.
|
double |
addFile(java.util.List<File> list)
Adds a set of files to the storage.
|
double |
addReservedFile(File file)
Adds a file for which the space has already been reserved.
|
boolean |
contains(File file)
Checks whether a file is stored in the storage or not.
|
boolean |
contains(java.lang.String fileName)
Checks whether a file is stored in the storage or not.
|
double |
deleteFile(File file)
Removes a file from the storage.
|
File |
deleteFile(java.lang.String fileName)
Removes a file from the storage.
|
double |
deleteFile(java.lang.String fileName,
File file)
Removes a file from the storage.
|
double |
getAvailableSpace()
Gets the available space on this storage in MByte.
|
double |
getCapacity()
Gets the total capacity of the storage in MByte.
|
double |
getCurrentSize()
Gets the current size of the storage in MByte.
|
File |
getFile(java.lang.String fileName)
Gets the file with the specified name.
|
java.util.List<java.lang.String> |
getFileNameList()
Gets the list of file names located on this storage.
|
double |
getMaxTransferRate()
Gets the maximum transfer rate of the storage in MByte/sec.
|
java.lang.String |
getName()
Gets the name of the storage.
|
int |
getNumStoredFile()
Gets the number of files stored on this storage.
|
boolean |
hasPotentialAvailableSpace(int fileSize)
Checks whether there is enough space on the storage for a certain file.
|
boolean |
isFull()
Checks if the storage is full or not.
|
boolean |
renameFile(File file,
java.lang.String newName)
Renames a file on the storage.
|
boolean |
reserveSpace(int fileSize)
Makes a reservation of the space on the storage to store a file.
|
boolean |
setMaxTransferRate(int rate)
Sets the maximum transfer rate of this storage system in MByte/sec.
|
java.lang.String getName()
double getCapacity()
double getCurrentSize()
double getMaxTransferRate()
double getAvailableSpace()
boolean setMaxTransferRate(int rate)
rate - the maximum transfer rate in MB/secboolean isFull()
int getNumStoredFile()
boolean reserveSpace(int fileSize)
fileSize - the size to be reserved in MBdouble addReservedFile(File file)
gridsim.datagrid.File#getTransactionTime().file - the file to be addedboolean hasPotentialAvailableSpace(int fileSize)
fileSize - a FileAttribute object to compare toFile getFile(java.lang.String fileName)
gridsim.datagrid.File#getTransactionTime().fileName - the name of the needed filejava.util.List<java.lang.String> getFileNameList()
double addFile(File file)
gridsim.datagrid.File#getTransactionTime().file - the file to be addeddouble addFile(java.util.List<File> list)
gridsim.datagrid.File#getTransactionTime().list - the files to be addedFile deleteFile(java.lang.String fileName)
gridsim.datagrid.File#getTransactionTime().fileName - the name of the file to be removeddouble deleteFile(java.lang.String fileName,
File file)
gridsim.datagrid.File#getTransactionTime().fileName - the name of the file to be removedfile - the file which is removed from the storage is returned through this parameterdouble deleteFile(File file)
gridsim.datagrid.File#getTransactionTime().file - the file which is removed from the storage is returned through this parameterboolean contains(java.lang.String fileName)
fileName - the name of the file we are looking forboolean contains(File file)
file - the file we are looking forboolean renameFile(File file, java.lang.String newName)
gridsim.datagrid.File#getTransactionTime().file - the file we would like to renamenewName - the new name of the file