当前位置: 首页>>代码示例>>Java>>正文


Java Cloudlet.SUCCESS属性代码示例

本文整理汇总了Java中org.cloudbus.cloudsim.Cloudlet.SUCCESS属性的典型用法代码示例。如果您正苦于以下问题:Java Cloudlet.SUCCESS属性的具体用法?Java Cloudlet.SUCCESS怎么用?Java Cloudlet.SUCCESS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.cloudbus.cloudsim.Cloudlet的用法示例。


在下文中一共展示了Cloudlet.SUCCESS属性的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: printCloudlet

private static void printCloudlet(Cloudlet cloudlet) {
	Log.print(String.format(fInt, cloudlet.getCloudletId()));

	if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
		Log.print(String.format(fString, "SUCCESS"));
		Log.print(String.format(fInt, cloudlet.getResourceId()));
		Log.print(String.format(fInt, cloudlet.getVmId()));
		Log.print(String.format(fInt, cloudlet.getCloudletLength()));
		Log.print(String.format(fFloat, cloudlet.getActualCPUTime()));
		Log.print(String.format(fFloat, cloudlet.getExecStartTime()));
		Log.print(String.format(fFloat, cloudlet.getFinishTime()));
		Log.print("\n");
	}
	else {
		Log.printLine("FAILED");
	}
}
 
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:17,代码来源:LogPrinter.java

示例2: printCloudlet

private void printCloudlet(Cloudlet cloudlet) {
	String content = String.format(fInt, cloudlet.getCloudletId());

	if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
		content = content +
				  String.format(fString, "SUCCESS") +
				  String.format(fInt, cloudlet.getResourceId()) +
				  String.format(fInt, cloudlet.getVmId()) +
				  String.format(fInt, cloudlet.getCloudletLength()) +
				  String.format(fFloat, cloudlet.getActualCPUTime()) +
				  String.format(fFloat, cloudlet.getExecStartTime()) +
				  String.format(fFloat, cloudlet.getFinishTime());
	}
	else {
		content += "FAILED";
	}
	append(content);
}
 
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:18,代码来源:GraphicSDNExample.java

示例3: printCloudletList

/**
 * Prints the Cloudlet objects
 * @param list  list of Cloudlets
 */
private static void printCloudletList(List<Cloudlet> list) {
	int size = list.size();
	Cloudlet cloudlet;

	String indent = "    ";
	Log.printLine();
	Log.printLine("========== OUTPUT ==========");
	Log.printLine("Cloudlet ID" + indent + "STATUS" + indent +
			"Data center ID" + indent + "VM ID" + indent + "Time" + indent + "Start Time" + indent + "Finish Time");

	for (int i = 0; i < size; i++) {
		cloudlet = list.get(i);
		Log.print(indent + cloudlet.getCloudletId() + indent + indent);

		if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS){
			Log.print("SUCCESS");

			DecimalFormat dft = new DecimalFormat("###.##");
			Log.printLine( indent + indent + cloudlet.getResourceId() + indent + indent + indent + cloudlet.getVmId() +
					indent + indent + dft.format(cloudlet.getActualCPUTime()) + indent + indent + dft.format(cloudlet.getExecStartTime())+
					indent + indent + dft.format(cloudlet.getFinishTime()));
		}
	}

}
 
开发者ID:demiaowu,项目名称:annotation-of-cloudsim3.0.3,代码行数:29,代码来源:NetworkExample4.java

示例4: printCloudletList

/**
 * Prints the Cloudlet objects
 * @param list  list of Cloudlets
 */
private static void printCloudletList(List<Cloudlet> list) {
	int size = list.size();
	Cloudlet cloudlet;

	String indent = "    ";
	Log.printLine();
	Log.printLine("========== OUTPUT ==========");
	Log.printLine("Cloudlet ID" + indent + "STATUS" + indent +
			"Data center ID" + indent + "VM ID" + indent + "Time" + indent + "Start Time" + indent + "Finish Time");

	DecimalFormat dft = new DecimalFormat("###.##");
	for (int i = 0; i < size; i++) {
		cloudlet = list.get(i);
		Log.print(indent + cloudlet.getCloudletId() + indent + indent);

		if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS){
			Log.print("SUCCESS");

			Log.printLine( indent + indent + cloudlet.getResourceId() + indent + indent + indent + cloudlet.getVmId() +
					indent + indent + dft.format(cloudlet.getActualCPUTime()) + indent + indent + dft.format(cloudlet.getExecStartTime())+
					indent + indent + dft.format(cloudlet.getFinishTime()));
		}
	}

}
 
开发者ID:demiaowu,项目名称:annotation-of-cloudsim3.0.3,代码行数:29,代码来源:CloudSimExample3.java

示例5: printCloudletList

/**
 * Prints the Cloudlet objects
 * @param list  list of Cloudlets
 */
private static void printCloudletList(List<Cloudlet> list) {
	int size = list.size();
	Cloudlet cloudlet;

	String indent = "    ";
	Log.printLine();
	Log.printLine("========== OUTPUT ==========");
	Log.printLine("Cloudlet ID" + indent + "STATUS" + indent +
			"Data center ID" + indent + "VM ID" + indent + indent + "Time" + indent + "Start Time" + indent + "Finish Time");

	DecimalFormat dft = new DecimalFormat("###.##");
	for (int i = 0; i < size; i++) {
		cloudlet = list.get(i);
		Log.print(indent + cloudlet.getCloudletId() + indent + indent);

		if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS){
			Log.print("SUCCESS");

			Log.printLine( indent + indent + cloudlet.getResourceId() + indent + indent + indent + cloudlet.getVmId() +
					indent + indent + indent + dft.format(cloudlet.getActualCPUTime()) +
					indent + indent + dft.format(cloudlet.getExecStartTime())+ indent + indent + indent + dft.format(cloudlet.getFinishTime()));
		}
	}

}
 
开发者ID:demiaowu,项目名称:annotation-of-cloudsim3.0.3,代码行数:29,代码来源:CloudSimExample8.java

示例6: printCloudletList

/**
 * Prints the Cloudlet objects.
 * 
 * @param list list of Cloudlets
 */
public static void printCloudletList(List<Cloudlet> list) {
	int size = list.size();
	Cloudlet cloudlet;

	String indent = "\t";
	Log.printLine();
	Log.printLine("========== OUTPUT ==========");
	Log.printLine("Cloudlet ID" + indent + "STATUS" + indent + "Resource ID" + indent + "VM ID" + indent
			+ "Time" + indent + "Start Time" + indent + "Finish Time");

	DecimalFormat dft = new DecimalFormat("###.##");
	for (int i = 0; i < size; i++) {
		cloudlet = list.get(i);
		Log.print(indent + cloudlet.getCloudletId());

		if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
			Log.printLine(indent + "SUCCESS" + indent + indent + cloudlet.getResourceId() + indent
					+ cloudlet.getVmId() + indent + dft.format(cloudlet.getActualCPUTime()) + indent
					+ dft.format(cloudlet.getExecStartTime()) + indent + indent
					+ dft.format(cloudlet.getFinishTime()));
		}
	}
}
 
开发者ID:Udacity2048,项目名称:CloudSimDisk,代码行数:28,代码来源:Helper.java

示例7: printCloudletList

/**
 * Prints the Cloudlet objects
 * @param list  list of Cloudlets
 */
private static void printCloudletList(List<Cloudlet> list) {
    int size = list.size();
    Cloudlet cloudlet;

    String indent = "    ";
    Log.printLine();
    Log.printLine("========== OUTPUT ==========");
    Log.printLine("Cloudlet ID" + indent + "STATUS" + indent +
            "Data center ID" + indent + "VM ID" + indent + "Time" + indent + "Start Time" + indent + "Finish Time");

    DecimalFormat dft = new DecimalFormat("###.##");
    for (int i = 0; i < size; i++) {
        cloudlet = list.get(i);
        Log.print(indent + cloudlet.getCloudletId() + indent + indent);

        if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS){
            Log.print("SUCCESS");

        	Log.printLine( indent + indent + cloudlet.getResourceId() + indent + indent + indent + cloudlet.getVmId() +
                 indent + indent + dft.format(cloudlet.getActualCPUTime()) + indent + indent + dft.format(cloudlet.getExecStartTime())+
                        indent + indent + dft.format(cloudlet.getFinishTime()));
        }
    }

}
 
开发者ID:marcbux,项目名称:dynamiccloudsim,代码行数:29,代码来源:CloudSimExample2.java

示例8: printCloudlet

private static void printCloudlet(Cloudlet cloudlet) {
	Log.print(String.format(LogPrinter.fInt, cloudlet.getCloudletId()));

	if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
		Log.print(String.format(LogPrinter.fString, "SUCCESS"));
		Log.print(String.format(LogPrinter.fInt, cloudlet.getResourceId()));
		Log.print(String.format(LogPrinter.fInt, cloudlet.getVmId()));
		Log.print(String.format(LogPrinter.fInt, cloudlet.getCloudletLength()));
		Log.print(String.format(LogPrinter.fFloat, cloudlet.getActualCPUTime()));
		Log.print(String.format(LogPrinter.fFloat, cloudlet.getExecStartTime()));
		Log.print(String.format(LogPrinter.fFloat, cloudlet.getFinishTime()));
		Log.print("\n");
	}
	else {
		Log.printLine("FAILED");
	}
}
 
开发者ID:jayjmin,项目名称:cloudsimsdn,代码行数:17,代码来源:LogPrinter.java

示例9: printCloudletList

/**
 * Prints the Cloudlet objects.
 * 
 * @param list
 *            list of Cloudlets
 * @throws IOException
 */
private static void printCloudletList(List<Cloudlet> list) throws IOException {
	int size = list.size();
	Cloudlet cloudlet;
	String indent = "    ";
	Log.printLine();
	Log.printLine("========== OUTPUT ==========");
	Log.printLine("Cloudlet ID" + indent + "STATUS" + indent + "Data center ID" + indent + "VM ID"
			+ indent + "Time" + indent + "Start Time" + indent + "Finish Time");

	DecimalFormat dft = new DecimalFormat("###.##");
	for (int i = 0; i < size; i++) {
		cloudlet = list.get(i);
		Log.print(indent + cloudlet.getCloudletId() + indent + indent);

		if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
			Log.print("SUCCESS");
			Log.printLine(indent + indent + cloudlet.getResourceId() + indent + indent + indent
					+ cloudlet.getVmId() + indent + indent + dft.format(cloudlet.getActualCPUTime())
					+ indent + indent + dft.format(cloudlet.getExecStartTime()) + indent + indent
					+ dft.format(cloudlet.getFinishTime()));
		}
	}

}
 
开发者ID:demiaowu,项目名称:annotation-of-cloudsim3.0.3,代码行数:31,代码来源:TestExample.java

示例10: printCloudletList

/**
 * Prints the Cloudlet objects
 * 
 * @param list
 *            list of Cloudlets
 */
private static void printCloudletList(List<Cloudlet> list) {
	int size = list.size();
	Cloudlet cloudlet;
	
	String indent = "    ";
	Log.printLine();
	Log.printLine("========== OUTPUT ==========");
	Log.printLine("Cloudlet ID" + indent + "STATUS" + indent + "Data center ID" + indent + "VM ID"
			+ indent + indent + "Time" + indent + "Start Time" + indent + "Finish Time");
	
	DecimalFormat dft = new DecimalFormat("###.##");
	for (int i = 0; i < size; i++) {
		cloudlet = list.get(i);
		Log.print(indent + cloudlet.getCloudletId() + indent + indent);
		
		if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
			Log.print("SUCCESS");
			
			Log.printLine(indent + indent + cloudlet.getResourceId() + indent + indent + indent
					+ cloudlet.getVmId() + indent + indent + indent
					+ dft.format(cloudlet.getActualCPUTime()) + indent + indent
					+ dft.format(cloudlet.getExecStartTime()) + indent + indent + indent
					+ dft.format(cloudlet.getFinishTime()));
		}
	}
	
}
 
开发者ID:Udacity2048,项目名称:CloudSimDisk,代码行数:33,代码来源:CloudSimExample8.java

示例11: printCloudletList

/**
 * Prints the Cloudlet objects.
 *
 * @param list list of Cloudlets
 */
private static void printCloudletList(List<Cloudlet> list) {
	int size = list.size();
	Cloudlet cloudlet;

	String indent = "    ";
	Log.printLine();
	Log.printLine("========== OUTPUT ==========");
	Log.printLine("Cloudlet ID" + indent + "STATUS" + indent
			+ "Data center ID" + indent + "VM ID" + indent + "Time" + indent
			+ "Start Time" + indent + "Finish Time");

	DecimalFormat dft = new DecimalFormat("###.##");
	for (int i = 0; i < size; i++) {
		cloudlet = list.get(i);
		Log.print(indent + cloudlet.getCloudletId() + indent + indent);

		if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
			Log.print("SUCCESS");

			Log.printLine(indent + indent + cloudlet.getResourceId()
					+ indent + indent + indent + cloudlet.getVmId()
					+ indent + indent
					+ dft.format(cloudlet.getActualCPUTime()) + indent
					+ indent + dft.format(cloudlet.getExecStartTime())
					+ indent + indent
					+ dft.format(cloudlet.getFinishTime()));
		}
	}
}
 
开发者ID:demiaowu,项目名称:annotation-of-cloudsim3.0.3,代码行数:34,代码来源:CloudSimExample1.java

示例12: processCloudletReturn

@Override
protected void processCloudletReturn(SimEvent ev) {
	// determine what kind of task was finished,
	Task task = (Task) ev.getData();
	Vm vm = availableVms.get(task.getVmId());
	Host host = vm.getHost();

	if (task.getCloudletStatus() == Cloudlet.SUCCESS) {
		Log.printLine(CloudSim.clock() + ": " + getName() + ": VM # " + task.getVmId() + " completed Task # " + task.getCloudletId() + " \"" + task.getName()
		    + " " + task.getParams() + " \"");

		// free task slots occupied by finished / cancelled tasks
		idleTaskSlots.add(vm);
		taskSucceeded(task, vm);

		// update the task queue by traversing the successor nodes in the
		// workflow
		for (DataDependency outgoingEdge : task.getWorkflow().getGraph().getOutEdges(task)) {
			if (host instanceof DynamicHost) {
				DynamicHost dHost = (DynamicHost) host;
				dHost.addFile(outgoingEdge.getFile());
			}
			Task child = task.getWorkflow().getGraph().getDest(outgoingEdge);
			child.decNDataDependencies();
			if (child.readyToExecute()) {
				taskReady(child);
			}
		}

	} else {

		Log.printLine(CloudSim.clock() + ": " + getName() + ": VM # " + task.getVmId() + " encountered an error with Task # " + task.getCloudletId() + " \""
		    + task.getName() + " " + task.getParams() + " \"");
		runningTasks.remove(task.getCloudletId());

		if (!task.isSpeculativeCopy()) {
			resetTask(task);
			taskReady(task);
		}

		idleTaskSlots.add(vm);
		taskFailed(task, vm);
	}

	if (tasksRemaining()) {
		submitTasks();
	} else if (signalFinished() || (idleTaskSlots.size() == getVmsCreatedList().size() * getTaskSlotsPerVm())) {
		Log.printLine(CloudSim.clock() + ": " + getName() + ": All Tasks executed. Finishing...");
		terminate();
		clearDatacenters();
		finishExecution();
	}
}
 
开发者ID:marcbux,项目名称:dynamiccloudsim,代码行数:53,代码来源:AbstractWorkflowScheduler.java


注:本文中的org.cloudbus.cloudsim.Cloudlet.SUCCESS属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。