本文整理汇总了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#");
}
示例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;
}
示例3: getSource
import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
@Override
public SimEntity getSource() {
return source;
}
示例4: setSource
import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
@Override
public void setSource(SimEntity source) {
this.source = source;
}
示例5: getDestination
import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
@Override
public SimEntity getDestination() {
return destination;
}
示例6: setDestination
import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
@Override
public void setDestination(SimEntity destination) {
this.destination = destination;
}
示例7: compareTo
import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
@Override public int compareTo(SimEntity o) {
return 0;
}
示例8: setSimulation
import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
@Override public SimEntity setSimulation(Simulation simulation) {
return this;
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例13: setName
import org.cloudbus.cloudsim.core.SimEntity; //导入依赖的package包/类
@Override public SimEntity setName(String newName) throws IllegalArgumentException { return this; }