i tried with synchronized keyword as well to get lock of method, but i failed
By making the method synchronized, you're trying to get a lock on current object (the one for which this method is called), while your other synchronized block is on a map. These locks will not be mutually connected anyway.
Based on the limited information I got from your posts, I think what you need is:
Please be aware, that I've no idea about how your map parameter is shared across threads. So, this may trigger some other synchronization issues. But, at least you'll move a step further.