public class IoEventQueueThrottle extends java.lang.Object implements IoEventQueueHandler
NOOP
Constructor and Description |
---|
IoEventQueueThrottle() |
IoEventQueueThrottle(int threshold) |
IoEventQueueThrottle(IoEventSizeEstimator eventSizeEstimator,
int threshold) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.lang.Object source,
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(java.lang.Object source,
IoEvent event)
Invoked after the specified event has been offered to the
event queue.
|
void |
polled(java.lang.Object source,
IoEvent event)
Invoked after the specified event has been polled from the
event queue.
|
void |
setThreshold(int threshold) |
protected void |
unblock() |
public IoEventQueueThrottle()
public IoEventQueueThrottle(int threshold)
public IoEventQueueThrottle(IoEventSizeEstimator eventSizeEstimator, int threshold)
public IoEventSizeEstimator getEventSizeEstimator()
public int getThreshold()
public int getCounter()
public void setThreshold(int threshold)
public boolean accept(java.lang.Object source, IoEvent event)
IoEventQueueHandler
accept
in interface IoEventQueueHandler
public void offered(java.lang.Object source, IoEvent event)
IoEventQueueHandler
offered
in interface IoEventQueueHandler
public void polled(java.lang.Object source, IoEvent event)
IoEventQueueHandler
polled
in interface IoEventQueueHandler
protected void block()
protected void unblock()
Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.