<p>This methods implements a synchronized block, but the code found at the beginning
of this block  only accesses local variables, and not member variables, or this. 
To be better performance move the code that access local variables only, above the
synchronized block, and leave the synchronized block only for field accesses, or access
to this object.</p>