Best way to kill and restart a workflow

Is your scenario an async activity invocation and in your workflow code you explicitly call continueAsNew via Workflow.newContinueAsNewStub?
This will not terminate your running activity (it will complete, but its results will not be recorded in workflow history). This is the same as instead of continueAsNew you just completed your workflow execution while async activity is still running.

If you want to give your running activity a chance to gracefully complete, invoke it inside cancellation scope, and call scope.cancel() before you call continueAsNew in your workflow code. Note that your activities must heartbeat in this case to receive ActivityCanceledException.

So for example as mentioned in this thread for calling continueAsNew inside signal method:

public void mySignalMethod(String input) {
        activityCancellationScope.cancel();
        // allow activity to cancel gracefully
        activityPromise.get();
        continueAsNewStub.execute(input);
    }

will terminate all the existing running activities, just like what “cancel” will do?

Cancelling a workflow (from client untyped stub for example) does not stop running activities (neither does terminate). Their results are not recorded in workflow history.
An activity can chose to ignore a cancellation request and complete execution. For an async invoked activity ActivityCanceledException is delivered on the next heartbeat (that can happen after workflow is already canceled). In case if you set
.setCancellationType(ActivityCancellationType.WAIT_CANCELLATION_COMPLETED)
in your activity options, ActivityCompletionException is delivered via heartbeat.