rackerlabs/repose — pull request #1009 by dmnjohns (2014-07-10 14:33:26+00:00)
Title: Springified reporting service

Once again, synchronized methods everywhere.

1) getLastReset doesn't need to be synchronized
2) updateConfiguration may be okay as a synchronized method
3) getDestinationInfo doesn't need to be synchronized
4) getDestinations doesn't need to be synchronized
5) incrementRequestCount may be okay as a synchronized method
6) recordServiceResponse may be okay as a synchronized method
7) getReposeInfo doesn't need to be synchronized
8) incrementReposeStatusCodeCount may be okay as a synchronized method
9) incrementReposeResponseCount may be okay as a synchronized method
10) processReposeRequestSize may be okay as a synchronized method
11) processReposeResponseSize may be okay as a synchronized method
12) reset may be okay as a synchronized method

Oh, and the destinations map should probably be a ConcurrentHashMap rather than a regular HashMap.

Oh oh, and most of the time we only need synchronization because we do silly things somewhere down the chain. For example, doing a set on a get + 1 (where the 1 is inexplicably a final variable rather than a literal) rather than actually incrementing the variable directly.