Package org.cloudbus.cloudsim.resources
Class DatacenterStorage
java.lang.Object
org.cloudbus.cloudsim.resources.DatacenterStorage
Implements the storage logic for a Datacenter. It keeps a list of
storage devices (Disk Array),
as well as all basic storage related operations.
This disk array can be, for instance, a list of
HarddriveStorage
or SanStorage
.- Since:
- CloudSim Plus 2.3.5
- Author:
- Rodrigo N. Calheiros, Anton Beloglazov, Abderrahman Lahiaouni
-
Constructor Summary
ConstructorDescriptionCreates a DatacenterStorage with an emptystorage list
.DatacenterStorage
(List<SanStorage> storageList) Creates a DatacenterStorage with a givenstorage list
. -
Method Summary
Modifier and TypeMethodDescriptionint
Adds a file to the first storage device that has enough capacityboolean
Checks whether the storageList has the given file.boolean
Checks whether the storageList has the given file.Gets the list of storage devices of the Datacenter, which is like a Disk Array.double
predictFileTransferTime
(List<String> requiredFiles) Predict the total time to transfer a list of files.void
Assigns all files of all storage devices to this Datacenter.void
setDatacenter
(Datacenter datacenter) final DatacenterStorage
setStorageList
(List<SanStorage> storageList) Sets the list of storage devices of the Datacenter, which is like a Disk Array.
-
Constructor Details
-
DatacenterStorage
public DatacenterStorage()Creates a DatacenterStorage with an emptystorage list
. -
DatacenterStorage
Creates a DatacenterStorage with a givenstorage list
.- Parameters:
storageList
- the storage list to set
-
-
Method Details
-
contains
Checks whether the storageList has the given file.- Parameters:
file
- a file to be searched- Returns:
- true if successful, false otherwise
-
contains
Checks whether the storageList has the given file.- Parameters:
fileName
- a file name to be searched- Returns:
- true if successful, false otherwise
-
getStorageList
Gets the list of storage devices of the Datacenter, which is like a Disk Array.- Returns:
-
setStorageList
Sets the list of storage devices of the Datacenter, which is like a Disk Array.- Parameters:
storageList
- the new storage list- Returns:
-
setAllFilesOfAllStoragesToThisDatacenter
public void setAllFilesOfAllStoragesToThisDatacenter()Assigns all files of all storage devices to this Datacenter. -
getDatacenter
-
setDatacenter
-
predictFileTransferTime
Predict the total time to transfer a list of files.- Parameters:
requiredFiles
- the files to be transferred- Returns:
- the total predicted time to transfer the files
-
addFile
Adds a file to the first storage device that has enough capacity- Parameters:
file
- the file to add- Returns:
- a tag from
DataCloudTags
informing the result of the operation
-