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


Java SimEntity类代码示例

本文整理汇总了Java中org.cloudbus.cloudsim.core.SimEntity的典型用法代码示例。如果您正苦于以下问题:Java SimEntity类的具体用法?Java SimEntity怎么用?Java SimEntity使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: IcmpPacket

import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
/**
 * Constructs a new ICMP packet.
 *
 * @param name            Name of this packet
 * @param packetID        the ID of this packet
 * @param size            size of the packet
 * @param source          the entity that sends out this packet
 * @param destination     the entity to which this packet is destined
 * @param netServiceLevel the class of traffic this packet belongs to
 * @pre name != null
 * @post $none
 */
public IcmpPacket(String name, int packetID, long size, SimEntity source, SimEntity destination, int netServiceLevel) {
    this.name = name;
    packetId = packetID;
    this.source = source;
    this.destination = destination;
    this.size = size;
    this.netServiceLevel = netServiceLevel;
    this.entities = new ArrayList<>();
    this.entryTimes = new ArrayList<>();
    this.exitTimes = new ArrayList<>();
    this.baudRates = new ArrayList<>();

    lastHop = this.source;
    tag = CloudSimTags.ICMP_PKT_SUBMIT;
    bandwidth = -1;
    num = new DecimalFormat("#0.000#");
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:30,代码来源:IcmpPacket.java

示例2: getAllCloudsIDs

import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
public static List<Integer> getAllCloudsIDs() {
	List<Integer> result = new ArrayList<>();
	for(SimEntity entity : CloudSim.getEntityList())
		if(entity instanceof StorageCloud)
			result.add(entity.getId());

	return result;
}
 
开发者ID:toebbel,项目名称:StorageCloudSim,代码行数:9,代码来源:StorageMetaBroker.java

示例3: getSource

import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
@Override
public SimEntity getSource() {
    return source;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:5,代码来源:IcmpPacket.java

示例4: setSource

import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
@Override
public void setSource(SimEntity source) {
    this.source = source;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:5,代码来源:IcmpPacket.java

示例5: getDestination

import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
@Override
public SimEntity getDestination() {
    return destination;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:5,代码来源:IcmpPacket.java

示例6: setDestination

import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
@Override
public void setDestination(SimEntity destination) {
    this.destination = destination;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:5,代码来源:IcmpPacket.java

示例7: compareTo

import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
@Override public int compareTo(SimEntity o) {
    return 0;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:4,代码来源:DatacenterNull.java

示例8: setSimulation

import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
@Override public SimEntity setSimulation(Simulation simulation) {
    return this;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:4,代码来源:DatacenterNull.java

示例9: addHop

import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
/**
 * Add an entity where the IcmpPacket traverses. This method should be
 * called by network entities that count as hops, for instance Routers or
 * CloudResources. It should not be called by links etc.
 *
 * @param entity the id of the hop that this IcmpPacket is traversing
 * @post $none
 */
public void addHop(SimEntity entity) {
    entities.add(entity);
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:12,代码来源:IcmpPacket.java

示例10: getHopsList

import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
/**
 * Gets a <b>read-only</b> list of all entities that this packet has traversed,
 * that defines the hops it has made.
 *
 * @return
 * @pre $none
 * @post $none
 */
public List<SimEntity> getHopsList() {
    return Collections.unmodifiableList(entities);
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:12,代码来源:IcmpPacket.java

示例11: getLastHop

import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
/**
 * Gets the entity that was the last hop where this packet has traversed.
 *
 * @return
 * @pre $none
 * @post $none
 */
public SimEntity getLastHop() {
    return lastHop;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:11,代码来源:IcmpPacket.java

示例12: setLastHop

import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
/**
 * Sets the entity that was the last hop where this packet has traversed.
 *
 * @param entity the entity to set as the last hop
 * @post $none
 */
public void setLastHop(SimEntity entity) {
    this.lastHop = entity;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:10,代码来源:IcmpPacket.java

示例13: setName

import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
@Override public SimEntity setName(String newName) throws IllegalArgumentException { return this; } 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:2,代码来源:DatacenterNull.java


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