title: Block all threads on a given object
body: <p>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. </p>
  
  <p>How do I do this again in Java? It's been a while since I've had to deal with this problem.</p>