@Override
    public void cancel() {
        synchronized (this.lock) {
            isCancelled = true;
        }
    }
Cancels this task. Once this returns, it's guaranteed that hasExecuted() will not change its value, and that this
task won't interrupt the threadToInterrupt this task was created with.
aws-java-sdk-core/src/main/java/com/amazonaws/http/timers/client/ClientExecutionAbortTaskImpl.java