Sorry for my somewhat confusion but i am getting a little confused and need some assistance with concurrency.
If i have a thread pool in a class which calculates some value every 10 seconds such as this
private final ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1);
executorService.schedule(callable, 10, TimeUnit.SECONDS);
How can I determine when the result has come back. When the result is ready I need to process a map and do some calculations and then delete / empty the map
The only way I can think of is to user Observable interface but I am guessing this is not the correct approach
Thanks