|
NetKernel APIs |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ten60.netkernel.transport.Throttle
The throttle limits the number of concurrent requests that may pass from the transport manager into the scheduler. It forces requests to wait until there is capacity to accomodate them.
Constructor Summary | |
Throttle()
Creates a new instance of Throttle with a default size of 5 |
Method Summary | |
int |
getConcurrentCount()
|
int |
getQueueSize()
|
boolean |
isBusy()
Returns true if there is any work to do |
void |
notifyOfReturn()
Informs the throttle that a request has completed and thus if necessary can release another request to execute |
void |
setMaxCount(int aCount)
Configure the number of concurrent requests we will permit |
void |
setMaxQueue(int aCount)
Configure the maximum queue size for blocked requests |
void |
throttle()
A blocking call to obtain permission to proceed with request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Throttle()
Method Detail |
public void setMaxCount(int aCount)
public void setMaxQueue(int aCount)
public void throttle() throws InterruptedException, ThrottleOverloadException
InterruptedException
- thrown if system interrupted
ThrottleOverloadException
- thrown if queue size becomes too large
before permission has been givenpublic void notifyOfReturn()
public boolean isBusy()
public int getConcurrentCount()
public int getQueueSize()
|
NetKernel APIs |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |