@ Override public boolean cancel ( final boolean mayInterruptIfRunning ) { synchronized ( lock ) { if ( isDone ( ) ) { return false ; } throwable = new CancellationException ( ) ; lock . notifyAll ( ) ; return true ; } }
Method cancels the future without delivering any specific reason .