Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor DatacenterSimple to move file storage features to a new StorageList class #141

Closed
manoelcampos opened this issue Jun 14, 2018 · 0 comments

Comments

@manoelcampos
Copy link
Collaborator

Move methods and storageList attribute from DatacenterSimple to a new StorageList class will reduce Datacenter's responsibilities to try to comply to the Single Responsibility Principle and also to the Interface Segregation Principle. That will also make easier to implement file storage features such as replication, since all the code may lie in this new class.

Detailed information about how the feature should work

An example scenario where this feature should be used

A brief explanation of why you think this feature is useful

AbderrahmanL added a commit to AbderrahmanL/cloudsim-plus that referenced this issue Jun 15, 2018
AbderrahmanL added a commit to AbderrahmanL/cloudsim-plus that referenced this issue Jun 17, 2018
AbderrahmanL added a commit to AbderrahmanL/cloudsim-plus that referenced this issue Jun 17, 2018
AbderrahmanL added a commit to AbderrahmanL/cloudsim-plus that referenced this issue Jun 17, 2018
AbderrahmanL added a commit to AbderrahmanL/cloudsim-plus that referenced this issue Jun 17, 2018
AbderrahmanL added a commit to AbderrahmanL/cloudsim-plus that referenced this issue Jun 17, 2018
AbderrahmanL added a commit to AbderrahmanL/cloudsim-plus that referenced this issue Jun 17, 2018
manoelcampos pushed a commit that referenced this issue Jun 18, 2018
manoelcampos added a commit that referenced this issue Jun 18, 2018
- Adds a static final storage attribute to the DatacenterNull class
  so that just one storage object is created for any  call to
  getDatacenterStorage();
- Removes the setStorageList() call inside the DatacenterStorage
  to set an empty storage list, because the DatacenterStorage already do that.
- Moves the datacenterStorage.setDatacenter(this) to the setDatacenterStorage method
  so that every time a storage is attached to the Datacenter, such a storage
  is linked to the Datacenter itself.

Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
@manoelcampos manoelcampos added this to the CloudSim Plus 3.0 milestone Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant