Synchronous instance methods use the object thisas a lock and prevent all synchronized instance methods (even others) from running across threads simultaneously.
, , , , .
, saveMap static, - ( ), , , , .
:
, :
private static synchronized void saveMap(Map<String, String> map) {
...
}
FYI, static synchronized ( MyClass.class), , .