slib.utils.threads
Class PoolLocker

java.lang.Object
  extended by slib.utils.threads.PoolLocker
Direct Known Subclasses:
PoolWorker, ThreadManager

public class PoolLocker
extends Object

Author:
seb

Field Summary
protected  int capacity
           
protected  Object lock
           
protected  int running
           
 
Constructor Summary
PoolLocker(int size)
           
 
Method Summary
 void addTask()
           
 void awaitFreeResource()
           
 int getCapacity()
           
 int getLoad()
           
 void taskComplete()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

capacity

protected int capacity

running

protected int running

lock

protected Object lock
Constructor Detail

PoolLocker

public PoolLocker(int size)
Parameters:
size -
Method Detail

addTask

public void addTask()

taskComplete

public void taskComplete()

awaitFreeResource

public void awaitFreeResource()
                       throws InterruptedException
Throws:
InterruptedException

getCapacity

public int getCapacity()
Returns:

getLoad

public int getLoad()
Returns:


Copyright © 2013. All Rights Reserved.