I have a java process which could either complete sooner or take longer time based on the volume of data its processing. However I need a way to capture the elapsed time after certain time continuously and need to log an alert message concurrently without interrupting the main process. I have explored Future option with ExecutorService but it would terminate the process after the set timeout and raises Timeout exception. Please suggest if you have any solution to achieve this requirement.
just some hints:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.