HashMap can be synchronized by Map m = Collections.synchronizedMap(hashMap);