Hi,

If you structure your code such that each request is accessing a global
resource that needs to be protected

i.e. your service has a get(..) method which accesses a regular HashMap,
then yes that HashMap needs to be protected.

If you structured your service to use concurrent structures -- Ignite Maps,
or concurrent HashMaps then you are ok.

See this example:https://apacheignite.readme.io/docs/service-example
Here all data is stored in Ignite Cache and therefore threadsafe.
(If you were to replace the IgntieCache with a HashMap then the code in
get/set would need to use locks/synchronized sections)

Thanks, Alex



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to