How would you design a thread-safe component, and why is adding synchronized to every method not a design?
Thread-safe component design starts by assigning every field a policy: confined, immutable or guarded by a named lock. Method-level synchronization is not enough because atomic methods do not compose into atomic workflows.