org.gudy.azureus2.plugins.utils
Interface Semaphore

All Known Implementing Classes:
SemaphoreImpl

public interface Semaphore

Author:
parg

Method Summary
 void release()
           
 void releaseAllWaiters()
           
 void reserve()
           
 boolean reserve(long timeout_millis)
          reserve a semaphore subject to timeout
 boolean reserveIfAvailable()
           
 

Method Detail

reserve

void reserve()

reserveIfAvailable

boolean reserveIfAvailable()

reserve

boolean reserve(long timeout_millis)
reserve a semaphore subject to timeout

Parameters:
timeout_millis - time to wait
Returns:
true -> semaphore reserved, false -> timeout exceeded

release

void release()

releaseAllWaiters

void releaseAllWaiters()