I implemented lock/unlock in Data by using a reference of LockManager. I think this is a "generic" functionality, and it should be here.
Hmm, Data class
was generic before you made it use your LockManager. Not anymore, -- if you want to replace your locking schema with something else, your (presumably generic) Data class has to change. So, here is a challenge for you, -- can your app use LockManager while you Data class knows nothing about it?
Eugene.