-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Weiwei Chen
committed
Mar 24, 2015
1 parent
d3adfd4
commit efaf781
Showing
52 changed files
with
743 additions
and
1,043 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/** | ||
* Copyright 2014-2015 University Of Southern California | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package org.workflowsim; | ||
|
||
import org.workflowsim.utils.Parameters.FileType; | ||
|
||
/** | ||
* This is a file implementation in WorkflowSim. Since CloudSim has already implemented File, | ||
* we call it FileItem here. The reason it is here is WorkflowSim has a different view | ||
* of files. | ||
* Case 1: in org.cloudsim.File, file size is integer, while in our case | ||
* it should be double sine we have many big files. Also, we would like to precisely estimate | ||
* the transfer delay. | ||
* Case 2: we would like to specify the type (input, output, intermediate) which is a different | ||
* concept to the type in CloudSim. | ||
* @author weiweich | ||
*/ | ||
public class FileItem { | ||
|
||
private String name; | ||
|
||
private double size; | ||
|
||
private FileType type; | ||
|
||
public FileItem(String name, double size) { | ||
this.name = name; | ||
this.size = size; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public void setSize(double size) { | ||
this.size = size; | ||
} | ||
|
||
public void setType(FileType type) { | ||
this.type = type; | ||
} | ||
|
||
public String getName() { | ||
return this.name; | ||
} | ||
|
||
public double getSize() { | ||
return this.size; | ||
} | ||
|
||
public FileType getType() { | ||
return this.type; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.