Tags

, ,

links:
http://docs.oracle.com/javase/tutorial/collections/implementations/wrapper.html

summary:
– example of the decorator pattern
– your input collection becomes the backing collection of the synchronized version
– “Wrapper implementations delegate all their real work to a specified collection but add extra functionality on top of what this collection offers.”
– *** when iterating thru collection not synchronized, need own lock ***
– bottom line, only single collection methods are sync’ed, combination of methods are _not_ sync’ed.

Advertisements