Domino have all objects synchronized within session so it does not look a good idea to do something with documents in multiple threads in Domino. Some time you need to do some on document that takes a lot of time out of Domino objects, like read some data from URL and put it to the document. Reading URL source data will take a lot of time there, so it is a good idea to do such task in multiple threads.
Take in to mind this multiple thread test on 50 documents
Only document access operations like computeWithForm:
1 thread: 110 ms
10 thread: 124 ms (looks like the same)
Document access (computeWithForm) and read source from URL:
1 thread: 14330 ms
10 thread: 2369 ms (83 % faster then one thread)
I want to present an special class for easy process documents in multiple threads. It based on ExtendedCollection and NotesExecutorService. Realization is under the cut.
Example of using ConcurrentCollection:
ConcurrentCollection and DocumentTask realisation: