public synchronized void gridletMove(int gridletId, int userId, int destId, boolean ack)
    {
        // cancel the Gridlet first
        ResGridlet rgl = cancel(gridletId, userId);

        // If no found then print an error msg
        if (rgl == null)
        {
            System.out.println(super.resName_ +
                    ".TimeSharedWithFailure.gridletMove(): Cannot find " +
                    "Gridlet #" + gridletId + " for User #" + userId);

            if (ack)   // sends ack that this operation fails
            {
                super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, false,
                              gridletId, userId);
            }
            return;
        }

        // if found
        rgl.finalizeGridlet();   // finalise Gridlet
        Gridlet gl = rgl.getGridlet();

        // if a Gridlet has finished execution
        if (gl.getGridletStatus() == Gridlet.SUCCESS)
        {
            System.out.println(super.resName_
                    + ".TimeSharedWithFailure.gridletMove(): Cannot move"
                    + " Gridlet #" + gridletId + " for User #" + userId
                    + " since it has FINISHED.");

            if (ack)
            {
                super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, false, gridletId,
                              userId);
            }

            super.sendFinishGridlet(gl);   // sends the Gridlet back to sender
        }
        // moves this Gridlet to another GridResource entity
        else {
            super.gridletMigrate(gl, destId, ack);
        }
    }