class File does not store actual data, in the same way that Cloudlets
do not execute actual code. File is provided to allow estimation of
data transfer costs in the Cloudlet processing (e.g, if a file is
required by a Cloudlet, the execution will be delayed by the time
required to transfer the file).
So, if you need actual data written to a place and accessed by
Cloudlets, you will have to extend class File.
Regards,
Rodrigo
Log.printLine(
"Capacity="+hdstCap+" Available="+hdstAvailSpace); // First step: Initialize the CloudSim package. It should be called // before creating any entities. int num_user = 1; // number of cloud usersCalendar calendar = Calendar.getInstance();
boolean trace_flag = false; // mean trace events // Initialize the CloudSim libraryCloudSim.init(num_user, calendar, trace_flag);
Config config =
new Config("./data/encrypt/data.cfg","read"); ciphertext = config.getProperty("CipherText"); cipherKey = config.getProperty("CipherKey");config.closeFile(
"read");CloudFile file2 =
new CloudFile ("data.cfg",2);file2.addCipherData(
ciphertext, cipherKey);Log.printLine(file2.getName());
//FileOutputStream fop = new FileOutputStream(file2);CloudSim.startSimulation();
//Date date = CloudSim.getSimulationCalendar().getTime(); //Log.printLine(date); // org.cloudbus.cloudsim.File file1 = new org.cloudbus.cloudsim.File ("data.cfg",50); // Log.printLine(file1.getName()); //file1.getFileAttribute(); //int size1 = file1.getSize(); //Log.printLine("size="+size1); double timetaken = hdst.addCloudFile(file2);hdstCap =
hdst.getCapacity();hdstAvailSpace =
hdst.getAvailableSpace();Log.printLine(
"Capacity="+hdstCap+" Available="+hdstAvailSpace);CloudFile fd1 =
hdst.getCloudFile("data.cfg"); ciphertext=fd1.getCipherData("cText"); cipherKey=fd1.getCipherData("cKey");
Hope it helps.
Regards,
Anshu
--
---
You received this message because you are subscribed to the Google Groups "cloudsim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudsim+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
*************************************************