cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/datacenters/DatacenterSimple.java
private boolean checksIfSubmittedCloudletIsAlreadyFinishedAndNotifyBroker(final Cloudlet cl, final boolean ack) {
        if(!cl.isFinished()){
            return false;
        }

        final String name = getSimulation().getEntityName(cl.getBroker().getId());
        Log.printConcatLine(
                getName(), ": Warning - Cloudlet #", cl.getId(), " owned by ", name,
                " is already completed/finished.");
        Log.printLine("Therefore, it is not being executed again");
        Log.printLine();

        /*
         NOTE: If a Cloudlet has finished, then it won't be processed.
         So, if ack is required, this method sends back a result.
         If ack is not required, this method don't send back a result.
         Hence, this might cause CloudSim to be hanged since waiting
         for this Cloudlet back.
        */
        sendCloudletSubmitAckToBroker(ack, cl,  false);

        sendNow(cl.getBroker().getId(), CloudSimTags.CLOUDLET_RETURN, cl);
        return true;
    }
/**
     * Checks if a submitted cloudlet has already finished.
     * If it is the case, the Datacenter notifies the Broker that
     * the Cloudlet cannot be created again because it has already finished.
     *
     * @param cl the submitted cloudlet
     * @param ack indicates if the Broker is waiting for an ACK after the Datacenter
     * receives the cloudlet submission
     * @return true if the submitted cloudlet has already finished, indicating
     * it can be created again; false otherwise
     */
Checks if a submitted cloudlet has already finished.
If it is the case, the Datacenter notifies the Broker that
the Cloudlet cannot be created again because it has already finished.

@param cl the submitted cloudlet
@param ack indicates if the Broker is waiting for an ACK after the Datacenter
receives the cloudlet submission
@return true if the submitted cloudlet has already finished, indicating
it can be created again; false otherwise
Checks if a submitted cloudlet has already finished . If it is the case the Datacenter notifies the Broker that the Cloudlet cannot be created again because it has already finished . @param cl the submitted cloudlet @param ack indicates if the Broker is waiting for an ACK after the Datacenter receives the cloudlet submission @return true if the submitted cloudlet has already finished indicating it can be created again ; false otherwise
private boolean checksIfSubmittedCloudletIsAlreadyFinishedAndNotifyBroker(final Cloudlet cl, final boolean ack) {
        if(!cl.isFinished()){
            return false;
        }
        final String name = getSimulation().getEntityName(cl.getBroker().getId());
        Log.printConcatLine(
                getName(), ": Warning - Cloudlet #", cl.getId(), " owned by ", name,
                " is already completed/finished.");
        Log.printLine("Therefore, it is not being executed again");
        Log.printLine();
        /*
         NOTE: If a Cloudlet has finished, then it won't be processed.
         So, if ack is required, this method sends back a result.
         If ack is not required, this method don't send back a result.
         Hence, this might cause CloudSim to be hanged since waiting
         for this Cloudlet back.
        */
        sendCloudletSubmitAckToBroker(ack, cl,  false);
        sendNow(cl.getBroker().getId(), CloudSimTags.CLOUDLET_RETURN, cl);
        return true;
    }
private boolean checksIfSubmittedCloudletIsAlreadyFinishedAndNotifyBroker ( final Cloudlet cl , final boolean ack ) { if ( ! cl . isFinished ( ) ) { return false ; } final String name = getSimulation ( ) . getEntityName ( cl . getBroker ( ) . getId ( ) ) ; Log . printConcatLine ( getName ( ) , ": Warning - Cloudlet #" , cl . getId ( ) , " owned by " , name , " is already completed/finished." ) ; Log . printLine ( "Therefore, it is not being executed again" ) ; Log . printLine ( ) ; /*
         NOTE: If a Cloudlet has finished, then it won't be processed.
         So, if ack is required, this method sends back a result.
         If ack is not required, this method don't send back a result.
         Hence, this might cause CloudSim to be hanged since waiting
         for this Cloudlet back.
        */ sendCloudletSubmitAckToBroker ( ack , cl , false ) ; sendNow ( cl . getBroker ( ) . getId ( ) , CloudSimTags . CLOUDLET_RETURN , cl ) ; return true ; }
Checks if a submitted cloudlet has already finished.
Checks if a submitted cloudlet has already finished .