CloudSim 里Cloudlet类

Cloudlet 类

是用来说明在VM中运行的任务的类

Cloudlet 的属性

用来说明任务的状态(如就绪,成功,失败,暂停等)

 public enum CloudletStatus {
        /** The Cloudlet has been created and added to the CloudletList object. */
        CREATED,

        /** The Cloudlet has been assigned to a CloudResource object to be executed as planned. */
        READY,

        /** The Cloudlet has moved to a Cloud node. */
        QUEUED,

        /** The Cloudlet is in execution in a Cloud node. */
        INEXEC,

        /** The Cloudlet has been executed successfully. */
        SUCCESS,

        /** The Cloudlet has failed. */
        FAILED,

        /** The Cloudlet has been canceled. */
        CANCELED,

        /** The Cloudlet has been paused. It can be resumed by changing the status into RESUMED. */
        PAUSED,

        /** The Cloudlet has been resumed from PAUSED state. */
        RESUMED,

        /** The cloudlet has failed due to a resource failure.*/
        FAILED_RESOURCE_UNAVAILABLE;
        public static final CloudletStatus[] values = values();
        // @NOTE: Convert an int to enum with CloudletStatus.values[i] (mind the array bounds)
    }

任务的ID

    /**
     * The cloudlet ID.
     */
    private final int cloudletId;

broker(管理器)的ID

    /**
     * The User or Broker ID. It is advisable that broker set this ID with its
     * own ID, so that CloudResource returns to it after the execution.
     */
    private int userId;

任务的ID(字符串)

    /** The Cloudlet UID */
    private String uid;

执行长度(任务的计算量)-对应的是设备CPU计算频率

   /**
     * The execution length of this Cloudlet (Unit: in Million Instructions
     * (MI)). According to this length and the power of the processor (in
     * Million Instruction Per Second - MIPS) where the cloudlet will be run,
     * the cloudlet will take a given time to finish processing. For instance,
     * for a cloudlet of 10000 MI running on a processor of 2000 MIPS, the
     * cloudlet will spend 5 seconds using the processor in order to be
     * completed (that may be uninterrupted or not, depending on the scheduling
     * policy).
     *
     * @see #setNumberOfPes(int)
     */
    private long cloudletLength;

输入的文件大小-对应的是设备存储空间

    /**
     * The input file size of this Cloudlet before execution (unit: in byte).
     * This size has to be considered the program + input data sizes.
     */
    private final long cloudletFileSize;

输出的文件大小

    /**
     * The output file size of this Cloudlet after execution (unit: in byte).
     * <p>
     * //TODO See
     * <a href="https://groups.google.com/forum/#!topic/cloudsim/MyZ7OnrXuuI">this
     * discussion</a>
     */
    private final long cloudletOutputSize;

执行任务需要的核心数

    /**
     * The number of Processing Elements (Pe) required to execute this cloudlet
     * (job).
     *
     * @see #setNumberOfPes(int)
     */
    private int numberOfPes;

任务的执行状态

    /**
     * The execution status of this Cloudlet.
     */
    private CloudletStatus status;

任务开始执行的时间

    /**
     * The execution start time of this Cloudlet. With new functionalities, such
     * as CANCEL, PAUSED and RESUMED, this attribute only stores the latest
     * execution time. Previous execution time are ignored.
     */
    private double execStartTime;

任务完成的时间

    /**
     * The time where this Cloudlet completes.
     */
    private double execFinishTime;

运行任务消耗的时间

    /** The total time to complete this Cloudlet. */
    private double totalCompletionTime;

是否要输出运行记录

    /**
     * Indicates if transaction history records for this Cloudlet is to be
     * outputted.
     */
    private final boolean record;

是否输出运行记录

    /**
     * Indicates if transaction history records for this Cloudlet is to be
     * outputted.
     */
    private final boolean record;

存储操作系统的分界

/**
     * Stores the operating system line separator.
     */
    private String newline;

任务的执行历史记录

    /**
     * The cloudlet transaction history.
     */
    private StringBuffer history;

云任务在每个VM上执行的列表(如果它在一个单一的云资源上开始并完成执行,而没有被迁移,这个列表将只有一个)

    /**
     * The list of every resource where the cloudlet has been executed. In case
     * it starts and finishes executing in a single cloud resource, without
     * being migrated, this list will have only one item.
     */
    private final List<Resource> resList;

任务最后执行位置的VM的ID

    /**
     * The index of the last resource where the cloudlet was executed. If the
     * cloudlet is migrated during its execution, this index is updated. The
     * value -1 indicates the cloudlet has not been executed
     * yet.
     */
    private int index;

任务种类和执行的优先级

    /**
     * The classType or priority of this Cloudlet for scheduling on a resource.
     */
    private int classType;

网络种类

    /**
     * The Type of Service (ToS) of IPv4 for sending Cloudlet over the network.
     */
    private int netToS;

数据格式

    /**
     * The format of decimal numbers.
     */
    private DecimalFormat num;

执行任务的用户ID

    /**
     * The id of the guest entity that is planned to execute the cloudlet.
     */
    protected int guestId;

计划执行任务的VM容器

    /**
     * The id of the container is planned to execute the cloudlet.
     * It may be -1, if containers are not in use
     */
    // TODO: Remo Andreoli: to be deprecated in favor of guestId
    protected int containerId = -1;

传输能耗/比特

    /**
     * The cost of each byte of bandwidth (bw) consumed.
     */
    protected double costPerBw;

传输任务总能量消耗

    /**
     * The total bandwidth (bw) cost for transferring the cloudlet by the
     * network, according to the {@link #cloudletFileSize}.
     */
    protected double accumulatedBwCost;

任务的CPU的使用量

    /**
     * The utilization model that defines how the cloudlet will use the VM's
     * CPU.
     */
    private UtilizationModel utilizationModelCpu;

任务的内存使用量

    /**
     * The utilization model that defines how the cloudlet will use the VM's
     * RAM.
     */
    private UtilizationModel utilizationModelRam;

任务的带宽使用量

   /**
     * The utilization model that defines how the cloudlet will use the VM's
     * bandwidth (bw).
     */
    private UtilizationModel utilizationModelBw;

任务的前置文件

    // Data cloudlet
    /**
     * The required files to be used by the cloudlet (if any). The time to
     * transfer these files by the network is considered when placing the
     * cloudlet inside a given VM
     */
    private List<String> requiredFiles = null;

用来存储任务运行状态的内部类-对应resList

/**
     * Internal class that keeps track of Cloudlet's movement in different
     * CloudResources. Each time a cloudlet is run on a given VM, the cloudlet's
     * execution history on each VM is registered at {@link Cloudlet#resList}
     */
    public static class Resource {

        /** Cloudlet's submission (arrival) time to a CloudResource. */
        public double arrivalTime = 0.0;

        /**
         * The time this Cloudlet resides in a CloudResource (from arrival time
         * until departure time, that may include waiting time).
         */
        public double wallClockTime = 0.0;

        /** The total time the Cloudlet spent being executed in a CloudResource. */
        public double actualCPUTime = 0.0;

        /** Cost per second a CloudResource charge to execute this Cloudlet. */
        public double costPerSec = 0.0;

        /** Cloudlet's length finished so far on the CloudResource. */
        public long cloudletFinishedSoFar = 0;

        /** CloudResource id. */
        public int resourceId = -1;

        /** CloudResource name. */
        public String resourceName = null;

    }

Cloudlet类的方法

更新云任务(重写此方法以自定义云任务行为)

    /**
     * Update the cloudlet (override this to customise the cloudlet behavior).
     * @param info a custom object class you may need to implement the update logic
     * @return true if the update causes a variation in cloudlet length
     */

    public boolean updateCloudlet(Object info)

结束任务仿真

   /**
     * Finalizes all relevant information before <tt>exiting</tt> the CloudResource entity. This
     * method sets the final data of:
     * <ul>
     * <li>wall clock time, i.e. the time of this Cloudlet resides in a CloudResource (from arrival
     * time until departure time).
     * <li>actual CPU time, i.e. the total execution time of this Cloudlet in a CloudResource.
     * <li>Cloudlet's finished time so far
     * </ul>
     *
     * @pre $none
     * @post $none
     */
    public void finalizeCloudlet()

给任务设置ID

    /**
     * Sets the id of the reservation made for this cloudlet.
     *
     * @param resId the reservation ID
     * @return <tt>true</tt> if the ID has successfully been set or
     * <tt>false</tt> otherwise.
     */
    public boolean setReservationId(final int resId)

得到任务的ID

   /**
     * Gets the reservation ID that owns this Cloudlet.
     *
     * @return a reservation ID
     * @pre $none
     * @post $none
     */
    public int getReservationId()

检查是否设置了任务ID

 /**
     * Checks whether this Cloudlet is submitted by reserving or not.
     *
     * @return <tt>true</tt> if this Cloudlet has reserved before,
     * <tt>false</tt> otherwise
     */
    public boolean hasReserved()

设置任务的计算量

    /**
     * Sets the length or size (in MI) of this Cloudlet to be executed in a
     * CloudResource. It has to be the length for each individual Pe,
     * <tt>not</tt> the total length (the sum of length to be executed by each
     * Pe).
     *
     * @param cloudletLength the length or size (in MI) of this Cloudlet to be
     *                       executed in a CloudResource
     * @return <tt>true</tt> if it is successful, <tt>false</tt> otherwise
     * @pre cloudletLength > 0
     * @post $none
     * @see #getCloudletTotalLength() }
     */
    public boolean setCloudletLength(final long cloudletLength)

设置网络服务类型

    /**
     * Sets the network service level (ToS) for sending this cloudlet over a
     * network.
     *
     * @param netServiceLevel determines the type of service (ToS) this cloudlet
     *                        receives in the network (applicable to selected PacketScheduler class
     *                        only)
     * @return <code>true</code> if successful.
     * @pre netServiceLevel >= 0
     * @post $none
     * <p>
     * //TODO The name of the setter is inconsistent with the attribute name,
     * what might be misinterpreted by other developers.
     */
    public boolean setNetServiceLevel(final int netServiceLevel)

获取网络服务类型

    /**
     * Gets the network service level (ToS) for sending this cloudlet over a
     * network.
     *
     * @return the network service level
     * @pre $none
     * @post $none
     * //TODO The name of the getter is inconsistent with the attribute name,
     * what might be misinterpreted by other developers.
     */
    public int getNetServiceLevel()

任务在执行前的等待时间

    /**
     * Gets the time the cloudlet had to wait before start executing on a
     * resource.
     *
     * @return the waiting time
     * @pre $none
     * @post $none
     */
    public double getWaitingTime()

设置任务的种类/优先级

    /**
     * Sets the classType or priority of this Cloudlet for scheduling on a
     * resource.
     *
     * @param classType classType of this Cloudlet
     * @return <tt>true</tt> if it is successful, <tt>false</tt> otherwise
     * @pre classType > 0
     * @post $none
     */
    public boolean setClassType(final int classType)

获取任务的种类/优先级

   /**
     * Gets the classtype or priority of this Cloudlet for scheduling on a
     * resource.
     *
     * @return classtype of this cloudlet
     * @pre $none
     * @post $none
     */
    public int getClassType()

设置任务需求的内核数量

    /**
     * Sets the number of PEs required to run this Cloudlet. <br>
     * NOTE: The Cloudlet length is computed only for 1 Pe for simplicity. <br>
     * For example, consider a Cloudlet that has a length of 500 MI and requires
     * 2 PEs. This means each Pe will execute 500 MI of this Cloudlet.
     *
     * @param numberOfPes number of Pe
     * @return <tt>true</tt> if it is successful, <tt>false</tt> otherwise
     * @pre numPE > 0
     * @post $none
     */
    public boolean setNumberOfPes(final int numberOfPes)

获取任务需求的内核数量

    /**
     * Gets the number of PEs required to run this Cloudlet.
     *
     * @return number of PEs
     * @pre $none
     * @post $none
     */
    public int getNumberOfPes() 

获取任务的执行状态

    /**
     * Gets the transaction history of this Cloudlet. The layout of this history
     * is in a readable table column with <tt>time</tt> and <tt>description</tt>
     * as headers.
     *
     * @return a String containing the history of this Cloudlet object.
     * @pre $none
     * @post $result != null
     */
    public String getCloudletHistory()

任务当前的执行量(当需要任务迁移时使用)

    /**
     * Gets the length of this Cloudlet that has been executed so far from the
     * latest CloudResource. This method is useful when trying to move this
     * Cloudlet into different CloudResources or to cancel it.
     *
     * @return the length of a partially executed Cloudlet or the full Cloudlet
     * length if it is completed
     * @pre $none
     * @post $result >= 0.0
     */
    public long getCloudletFinishedSoFar()

设置当前任务执行的执行量(当需要任务迁移时使用)

    /**
     * Sets the length of this Cloudlet that has been executed so far. This
     * method is used by ResCloudlet class when an application is decided to
     * cancel or to move this Cloudlet into different CloudResources.
     *
     * @param length length of this Cloudlet
     * @pre length >= 0.0
     * @post $none
     * @see VmAllocationPolicy
     * @see Cloudlet
     */
    public void setCloudletFinishedSoFar(final long length) 

更新当前完成的任务数量

    /**
     * Updates the length of cloudlet that has already been completed.
     *
     * @param miLength cloudlet length in Instructions (I)
     * @pre miLength >= 0.0
     * @post $none
     */
    public void updateCloudletFinishedSoFar(long miLength)

任务是否执行完成

    /**
     * Checks whether this Cloudlet has finished execution or not.
     *
     * @return <tt>true</tt> if this Cloudlet has finished execution,
     * <tt>false</tt> otherwise
     * @pre $none
     * @post $none
     */
    public boolean isFinished()

设置用户发起者的ID

 /**
     * Sets the user or owner ID of this Cloudlet. It is <tt>VERY</tt> important
     * to set the user ID, otherwise this Cloudlet will not be executed in a
     * CloudResource.
     *
     * @param id the user ID
     * @pre id >= 0
     * @post $none
     */
    public void setUserId(final int id)

最近执行任务的设备ID

   /**
     * Gets the latest resource ID that processes this Cloudlet.
     *
     * @return the resource ID or <tt>-1</tt> if none
     * @pre $none
     * @post $result >= -1
     */
    public int getResourceId() 

获得执行完成时间

public double getExecFinishTime() {
        return execFinishTime;
    }

    @Deprecated
    public double getFinishTime() { return getExecFinishTime(); }

获得任务的输入文件大小

   /**
     * Gets the input file size of this Cloudlet <tt>BEFORE</tt> submitting to a
     * CloudResource.
     *
     * @return the input file size of this Cloudlet
     * @pre $none
     * @post $result >= 1
     */
    public long getCloudletFileSize()

获得任务的输出文件大小

    /**
     * Gets the output size of this Cloudlet <tt>AFTER</tt> submitting and
     * executing to a CloudResource.
     *
     * @return the Cloudlet output file size
     * @pre $none
     * @post $result >= 1
     */
    public long getCloudletOutputSize()

设置任务在哪里执行(之后设置会发起任务迁移)

   /**
     * Sets the resource parameters for which the Cloudlet is going to be
     * executed. From the second time this method is called, every call make the
     * cloudlet to be migrated to the indicated resource.<br>
     * <p>
     * NOTE: This method <tt>should</tt> be called only by a resource entity,
     * not the user or owner of this Cloudlet.
     *
     * @param resourceID the CloudResource ID
     * @param cost       the cost running this CloudResource per second
     * @pre resourceID >= 0
     * @pre cost > 0.0
     * @post $none
     */
    public void setResourceParameter

设置任务发起时间

    /**
     * Sets the submission (arrival) time of this Cloudlet into a CloudResource.
     *
     * @param clockTime the submission time
     * @pre clockTime >= 0.0
     * @post $none
     */
    public void setSubmissionTime(final double clockTime)

获取任务发起时间

    /**
     * Gets the submission (arrival) time of this Cloudlet from the latest
     * CloudResource.
     *
     * @return the submission time or <tt>0.0</tt> if none
     * @pre $none
     * @post $result >= 0.0
     */
    public double getSubmissionTime() 

   @Deprecated
    public double getCloudletArrivalTime() { return getSubmissionTime(); }
    @Deprecated
    public double getArrivalTime() { return getSubmissionTime(); }

获取任务开始执行的时间

   /**
     * Sets the execution start time of this Cloudlet inside a CloudResource.
     * <br/>
     * <b>NOTE:</b> With new functionalities, such as being able to cancel / to
     * pause / to resume this Cloudlet, the execution start time only holds the
     * latest one. Meaning, all previous execution start time are ignored.
     *
     * @param clockTime the latest execution start time
     * @pre clockTime >= 0.0
     * @post $none
     */
    public void setExecStartTime(final double clockTime) 

设置执行的参数

   /**
     * Sets the Cloudlet's execution parameters. These parameters are set by the
     * CloudResource before departure or sending back to the original Cloudlet's
     * owner.
     *
     * @param wallTime   the time of this Cloudlet resides in a CloudResource
     *                   (from arrival time until departure time).
     * @param actualTime the total execution time of this Cloudlet in a
     *                   CloudResource.
     * @pre wallTime >= 0.0
     * @pre actualTime >= 0.0
     * @post $none
     * @see Resource#wallClockTime
     * @see Resource#actualCPUTime
     */
    public void setExecParam(final double wallTime, final double actualTime)

获取任务当前状态(枚举值)

    public CloudletStatus getStatus() { return status; }

设置任务状态

    /**
     * Sets the execution status of the Cloudlet.
     *
     * @param status the Cloudlet status
     * @return <tt>true</tt> if the new status has been set, <tt>false</tt> otherwise
     * @pre status >= 0
     * @post $none
     */
    public boolean setStatus(final CloudletStatus status)

获得任务执行相关用户和设备ID

    public int getUserId() { return userId; }

    public int getCloudletId() { return cloudletId; }

    public int getContainerId() { return containerId; }
    public void setContainerId(int containerId) { this.containerId = containerId; }

获得状态字符串

   /**
     * Gets the string representation of the current Cloudlet status code.
     *
     * @return the Cloudlet status code as a string or <tt>null</tt> if the
     * status code is unknown
     * @pre $none
     * @post $none
     */
    public String getCloudletStatusString()

获得单核任务的计算量

   /**
     * Gets the length of this Cloudlet.
     *
     * @return the length of this Cloudlet
     * @pre $none
     * @post $result >= 0.0
     */
    public long getCloudletLength()

计算多核情况下的总计算量

    /**
     * Gets the total length (across all PEs) of this Cloudlet. It considers the
     * {@link #cloudletLength} of the cloudlet to be executed in each Pe and the
     * {@link #numberOfPes}.<br/>
     * <p>
     * For example, setting the cloudletLenght as 10000 MI and
     * {@link #numberOfPes} to 4, each Pe will execute 10000 MI. Thus, the
     * entire cloudlet has a total length of 40000 MI.
     *
     * @return the total length of this Cloudlet
     * @pre $none
     * @post $result >= 0.0
     * @see #setCloudletLength(long)
     */
    public long getCloudletTotalLength()

获得执行时间

    public double getExecStartTime() { return execStartTime; }

获得任务的执行成本

   /**
     * Gets the cost/sec of running the Cloudlet in the latest CloudResource.
     *
     * @return the cost associated with running this Cloudlet or <tt>0.0</tt> if
     * none
     * @pre $none
     * @post $result >= 0.0
     */
    public double getCostPerSec()

获得在最近执行设备的驻留时间(从到达时间到离开时间)

    /**
     * Gets the time of this Cloudlet resides in the latest CloudResource (from
     * arrival time until departure time).
     *
     * @return the time of this Cloudlet resides in a CloudResource
     * @pre $none
     * @post $result >= 0.0
     */
    public double getWallClockTime() 

获得所有执行过该任务的设备

    /**
     * Gets all the CloudResource names that executed this Cloudlet.
     *
     * @return an array of CloudResource names or <tt>null</tt> if it has none
     * @pre $none
     * @post $none
     */
    public String[] getAllResourceName()

获得所有执行过该任务的设备ID

   /**
     * Gets all the CloudResource IDs that executed this Cloudlet.
     *
     * @return an array of CloudResource IDs or <tt>null</tt> if it has none
     * @pre $none
     * @post $none
     */
    public int[] getAllResourceId()

获取任务在给定ID设备的执行时间

   /**
     * Gets the total execution time of this Cloudlet in a given CloudResource
     * ID.
     *
     * @param resId a CloudResource entity ID
     * @return the total execution time of this Cloudlet in a CloudResource or
     * <tt>0.0</tt> if not found
     * @pre resId >= 0
     * @post $result >= 0.0
     */
    public double getActualCPUTime(final int resId) 

获取任务在给定ID设备的执行成本

    /**
     * Gets the cost running this Cloudlet in a given CloudResource ID.
     *
     * @param resId a CloudResource entity ID
     * @return the cost associated with running this Cloudlet or <tt>0.0</tt> if
     * not found
     * @pre resId >= 0
     * @post $result >= 0.0
     */
    public double getCostPerSec(final int resId) 

获取任务在给定ID设备执行了多少

  /**
     * Gets the length of this Cloudlet that has been executed so far in a given
     * CloudResource ID. This method is useful when trying to move this Cloudlet
     * into different CloudResources or to cancel it.
     *
     * @param resId a CloudResource entity ID
     * @return the length of a partially executed Cloudlet or the full Cloudlet
     * length if it is completed or <tt>0.0</tt> if not found
     * @pre resId >= 0
     * @post $result >= 0.0
     */
    public long getCloudletFinishedSoFar(final int resId)

获得任务的剩余执行量

   /**
     * Gets the remaining cloudlet length that has to be execute yet,
     * considering the {@link #getCloudletTotalLength()}.
     *
     * @return cloudlet length
     * @pre $none
     * @post $result >= 0
     */
    public long getRemainingCloudletLength() 

获得任务在指定设备的到达时间

    /**
     * Gets the submission (arrival) time of this Cloudlet in the given
     * CloudResource ID.
     *
     * @param resId a CloudResource entity ID
     * @return the submission time or <tt>0.0</tt> if not found
     * @pre resId >= 0
     * @post $result >= 0.0
     */
    public double getSubmissionTime(final int resId)

根据ID获得设备名称

   /**
     * Gets the CloudResource name based on its ID.
     *
     * @param resId a CloudResource entity ID
     * @return the CloudResource name or <tt>null</tt> if not found
     * @pre resId >= 0
     * @post $none
     */
    public String getResourceName(final int resId)

根据ID获得设备信息

  /**
     * Gets the resource by id.
     *
     * @param resourceId the resource id
     * @return the resource by id
     */
    public Resource getResourceById(final int resourceId)

获得任务执行时间

    /**
     * Returns the execution time of the Cloudlet.
     *
     * @return time in which the Cloudlet was running
     * @pre $none
     * @post $none
     */
    public double getActualCPUTime()

设置将要运行该任务的设备信息(ID,运行该任务的能耗,传输能耗)

   /**
     * Sets the resource parameters for which this Cloudlet is going to be
     * executed. <br>
     * NOTE: This method <tt>should</tt> be called only by a resource entity,
     * not the user or owner of this Cloudlet.
     *
     * @param resourceID the CloudResource ID
     * @param costPerCPU the cost per second of running this Cloudlet
     * @param costPerBw  the cost per byte of data transfer to the Datacenter
     * @pre resourceID >= 0
     * @pre cost > 0.0
     * @post $none
     */
    public void setResourceParameter(final int resourceID, final double costPerCPU, final double costPerBw) 

获得执行该任务的总消耗(传入能耗+运行能耗+输出能耗)

   /**
     * Gets the total cost of processing or executing this Cloudlet
     * <tt>Processing Cost = input data transfer + processing cost + output
     * transfer cost</tt> .
     *
     * @return the total cost of processing Cloudlet
     * @pre $none
     * @post $result >= 0.0
     */
    public double getProcessingCost() 

增加依赖文件

   /**
     * Adds the required filename to the list.
     *
     * @param fileName the required filename
     * @return <tt>true</tt> if succesful, <tt>false</tt> otherwise
     */
    public boolean addRequiredFile(final String fileName) 

删除依赖文件

   /**
     * Deletes the given filename from the list.
     *
     * @param filename the given filename to be deleted
     * @return <tt>true</tt> if succesful, <tt>false</tt> otherwise
     */
    public boolean deleteRequiredFile(final String filename)

检查任务是否有文件依赖

   /**
     * Checks whether this cloudlet requires any files or not.
     *
     * @return <tt>true</tt> if required, <tt>false</tt> otherwise
     */
    public boolean requiresFiles()

获取和设置用于/虚拟机ID

    public int getGuestId() { return guestId; }

    @Deprecated
    public int getVmId() {return getGuestId(); }

    public void setGuestId(int guestId) { this.guestId = guestId; }

    @Deprecated
    public void setVmId(int vmId) { setGuestId(vmId); }

设置/获取CPU/内存/带宽消耗

   /**
     * Gets the utilization model of cpu.
     *
     * @return the utilization model cpu
     */
    public UtilizationModel getUtilizationModelCpu()

    /**
     * Sets the utilization model of cpu.
     *
     * @param utilizationModelCpu the new utilization model of cpu
     */
    public void setUtilizationModelCpu(final UtilizationModel utilizationModelCpu)

    /**
     * Gets the utilization model of ram.
     *
     * @return the utilization model of ram
     */
    public UtilizationModel getUtilizationModelRam() 

    /**
     * Sets the utilization model of ram.
     *
     * @param utilizationModelRam the new utilization model of ram
     */
    public void setUtilizationModelRam(final UtilizationModel utilizationModelRam) 

    /**
     * Gets the utilization model of bw.
     *
     * @return the utilization model of bw
     */
    public UtilizationModel getUtilizationModelBw()

    /**
     * Sets the utilization model of bw.
     *
     * @param utilizationModelBw the new utilization model of bw
     */
    public void setUtilizationModelBw(final UtilizationModel utilizationModelBw) 

更新/获取任务ID

 /**
     * Get am Unique Identifier (UID) of the cloudlet.
     *
     * @return The UID
     */
    public String getUid() 

    /** update uid after change of cloudletId or userId */
    private void updateUid()

获取CPU/内存/带宽的使用量

    /**
     * Gets the utilization percentage of cpu.
     *
     * @param time the time
     * @return the utilization of cpu
     */
    public double getUtilizationOfCpu(final double time)

    /**
     * Gets the utilization percentage of memory.
     *
     * @param time the time
     * @return the utilization of memory
     */
    public double getUtilizationOfRam(final double time)

    /**
     * Gets the utilization percentage of bw.
     *
     * @param time the time
     * @return the utilization of bw
     */
    public double getUtilizationOfBw(final double time)

获取设置依赖文件

 public List<String> getRequiredFiles() { return requiredFiles; }

 protected void setRequiredFiles(List<String> requiredFiles)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值