Block all threads on a given object
===

I need to basically write a lock for the current project I'm working on that when a connection has failed, all threads calling a given method should hang until the connection is reestablished. 

How do I do this again in Java? It's been a while since I've had to deal with this problem.
