FileDocCategorySizeDatePackage
SemaphoreImpl.javaAPI DocAzureus 3.0.3.41697Fri Aug 25 19:01:16 BST 2006org.gudy.azureus2.pluginsimpl.local.utils

SemaphoreImpl

public class SemaphoreImpl extends Object implements Semaphore
author
parg

Fields Summary
private static long
next_sem_id
private org.gudy.azureus2.core3.util.AESemaphore
sem
Constructors Summary
protected SemaphoreImpl(org.gudy.azureus2.plugins.PluginInterface pi)

		synchronized( SemaphoreImpl.class ){
			
			sem	= new AESemaphore("Plugin " + pi.getPluginID() + ":" + next_sem_id++ );
		}
	
Methods Summary
public voidrelease()

		sem.release();
	
public voidreleaseAllWaiters()

		sem.releaseAllWaiters();
	
public voidreserve()

		sem.reserve();
	
public booleanreserve(long timeout_millis)

		return( sem.reserve( timeout_millis ));
	
public booleanreserveIfAvailable()

		return( sem.reserveIfAvailable());