|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cruxframework.crux.core.client.executor.ThrottleExecutor
public abstract class ThrottleExecutor
Throttles a chain of incoming tasks in order to execute only some of them, ensuring that the max number of tasks executed per second is fixed.
| Constructor Summary | |
|---|---|
ThrottleExecutor(int ratio)
Creates a executor capable of controlling the interval between the invocations to its action. |
|
| Method Summary | |
|---|---|
protected abstract void |
doAction()
Executes the desired action. |
void |
throttle()
Throttles the invocations on the executor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThrottleExecutor(int ratio)
ratio - the interval between the invocations, in milliseconds| Method Detail |
|---|
public void throttle()
protected abstract void doAction()
ratio
field of this instance.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||