public class IoEventQueueThrottle extends Object implements IoEventQueueHandler
NOOP
Constructor and Description |
---|
IoEventQueueThrottle() |
IoEventQueueThrottle(int threshold) |
IoEventQueueThrottle(IoEventSizeEstimator eventSizeEstimator,
int threshold) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Object source,
IoEvent event) |
protected void |
block() |
int |
getCounter() |
IoEventSizeEstimator |
getEventSizeEstimator() |
int |
getThreshold() |
void |
offered(Object source,
IoEvent event)
Invoked after the specified event has been offered to the
event queue.
|
void |
polled(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(Object source, IoEvent event)
accept
in interface IoEventQueueHandler
source
- The source of eventevent
- The received eventpublic void offered(Object source, IoEvent event)
IoEventQueueHandler
offered
in interface IoEventQueueHandler
source
- The source of eventevent
- The received eventpublic void polled(Object source, IoEvent event)
IoEventQueueHandler
polled
in interface IoEventQueueHandler
source
- The source of eventevent
- The received eventprotected void block()
protected void unblock()
Copyright © 2004–2016 Apache MINA Project. All rights reserved.