Nov 14th, 2012, 05:21 AM
GridFsTemplate thread safety
Is the GridFsTemplate thread safe? It is mentioned for the MongoTemplate that it is thread safe in the documentation
here. But what about the GridFsTemplate?
For example if in some method of my object is creating, reading, deleting a single file (GridFsResource), and I am expecting there are several threads which will be executing that method as this object is autowired in one of the controller with Spring MVC.
Can I be certain that GridFsTemplate will make sure that everything is performed in isolation if I reuse the same gridFsTemplate singleton bean everywhere or do I have to take care of synchronization for operations performed with GridFsTemplate myself?
Last edited by patelatharva; Nov 14th, 2012 at 09:45 PM.
Tags for this Thread