java scheduler spring vs quartz
<p>Currently I am building a spring standalone program in order to learn new methods and architectures.<br>
The last few days I tried to learn scheduler. I never used them before so I read some articles handling the different possible methods. Two of them are especially interesting: The spring nativ @Scheduler and Quartz.  </p>

<p>From what I read, Spring is a little bit smaller then Quartz and much more basic. And quartz is not easy to use with spring (because of the autowired and components).  </p>

<p>My problem now is, that there is one thing I do not understand:<br>
From my understanding, both methods are creating parallel Threads in order to asynchronously run the jobs. But what if I now have a spring @Service in my main Application, that is holding a HashMap with some information. The data is updated and changed with user interaction. Parallel there are the scheduler. And a scheduler now whants to use this HashMap from the main application as well. Is this even possible?<br>
Or do I understand something wrong? Because there is also the @Async annotation and I did not understand the difference. Because a scheduler itself is already parallel to the main corpus, isn't it?  </p>

<p>(summing up, two questions:  </p>

<ul>
<li>can a job that is executed every five seconds, implemented with a scheduler, use a HashMap out of a service inside the main program? (in spring @Scheduler and/or in Quartz?)  </li>
<li>Why is there a @Async annotation. Isn't a scheduler already parallel to the main process?  </li>
</ul>

<p>)</p>