|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.filter.executor.IoEventQueueThrottle
public class IoEventQueueThrottle
Throttles incoming events into OrderedThreadPoolExecutor
or
UnorderedThreadPoolExecutor
.
Constructor Summary | |
---|---|
IoEventQueueThrottle()
|
|
IoEventQueueThrottle(int threshold)
|
|
IoEventQueueThrottle(IoEventSizeEstimator eventSizeEstimator,
int threshold)
|
Method Summary | |
---|---|
boolean |
accept(ThreadPoolExecutor executor,
IoEvent event)
Returns true if and only if the specified event is allowed to be offered to the event queue. |
protected void |
block()
|
int |
getCounter()
|
IoEventSizeEstimator |
getEventSizeEstimator()
|
int |
getThreshold()
|
void |
offered(ThreadPoolExecutor executor,
IoEvent event)
Invoked after the specified event has been offered to the event queue. |
void |
polled(ThreadPoolExecutor executor,
IoEvent event)
Invoked after the specified event has been polled from the event queue. |
void |
setThreshold(int threshold)
|
protected void |
unblock()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IoEventQueueThrottle()
public IoEventQueueThrottle(int threshold)
public IoEventQueueThrottle(IoEventSizeEstimator eventSizeEstimator, int threshold)
Method Detail |
---|
public IoEventSizeEstimator getEventSizeEstimator()
public int getThreshold()
public int getCounter()
public void setThreshold(int threshold)
public boolean accept(ThreadPoolExecutor executor, IoEvent event)
IoEventQueueHandler
accept
in interface IoEventQueueHandler
public void offered(ThreadPoolExecutor executor, IoEvent event)
IoEventQueueHandler
offered
in interface IoEventQueueHandler
public void polled(ThreadPoolExecutor executor, IoEvent event)
IoEventQueueHandler
polled
in interface IoEventQueueHandler
protected void block()
protected void unblock()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |