use Thread.sleep(5000). future.cancel();