Causes the current thread to wait until this instance acquires leadership unless the thread is {@linkplain Thread#interrupt interrupted} or {@linkplain #close() closed}.
If this instance already is the leader then this method returns immediately.
Otherwise the current thread becomes disabled for thread scheduling purposes and lies dormant until one of three things happen:
If the current thread:
then {@link InterruptedException} is thrown and the current thread'sinterrupted status is cleared.
@throws InterruptedException if the current thread is interruptedwhile waiting @throws EOFException if the instance is {@linkplain #close() closed}while waiting
|
|
|
|
|
|