cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudsimplus/faultinjection/HostFaultInjection.java
private void scheduleFaultInjection() {
        final long numOfOtherEvents =
            getSimulation()
                .getNumberOfFutureEvents(
                    evt -> evt.getTag() != CloudSimTags.HOST_FAILURE);
        /*
        Just re-schedule more failures if there are other events to be processed.
        Otherwise, the simulation has finished and no more failures should be scheduled.
        */

        if (numOfOtherEvents > 0 || getSimulation().clock() < getMaxTimeToGenerateFailureInSeconds()) {
            schedule(getId(), getTimeDelayForNextFault(), CloudSimTags.HOST_FAILURE);
        }
    }
/**
     * Schedules a message to be processed internally
     * to inject a Host PEs failure.
     */
Schedules a message to be processed internally
to inject a Host PEs failure.
Schedules a message to be processed internally to inject a Host PEs failure .
private void scheduleFaultInjection() {
        final long numOfOtherEvents =
            getSimulation()
                .getNumberOfFutureEvents(
                    evt -> evt.getTag() != CloudSimTags.HOST_FAILURE);
        /*
        Just re-schedule more failures if there are other events to be processed.
        Otherwise, the simulation has finished and no more failures should be scheduled.
        */
        if (numOfOtherEvents > 0 || getSimulation().clock() < getMaxTimeToGenerateFailureInSeconds()) {
            schedule(getId(), getTimeDelayForNextFault(), CloudSimTags.HOST_FAILURE);
        }
    }
private void scheduleFaultInjection ( ) { final long numOfOtherEvents = getSimulation ( ) . getNumberOfFutureEvents ( evt -> evt . getTag ( ) != CloudSimTags . HOST_FAILURE ) ; /*
        Just re-schedule more failures if there are other events to be processed.
        Otherwise, the simulation has finished and no more failures should be scheduled.
        */ if ( numOfOtherEvents > 0 || getSimulation ( ) . clock ( ) < getMaxTimeToGenerateFailureInSeconds ( ) ) { schedule ( getId ( ) , getTimeDelayForNextFault ( ) , CloudSimTags . HOST_FAILURE ) ; } }
Schedules a message to be processed internally
 to inject a Host PEs failure.
Schedules a message to be processed internally to inject a Host PEs failure .