lock.waitLock(30000) would try to set a lock, and if
-it manages to set a lock within 30 seconds, it will not return an exception and so the statement will continue
->When the statement is done it releases the lock instantly ( or basically "unlocks the lock" )
-it does NOT manage to set a lock within 30 seconds, it returns an exception and the statement below won't happen
I suppose this can be called "Shared Resource State" - if there is a lock, it is "occupied" and you will have to wait until it is "vacant" to use it ( and you should make it "occupied" until you are done, and you shouldn't keep it occupied when you don't need it anymore).
I wonder what happens if you never release the lock?