org.apache.mina.filter.executor
Class IoEventQueueThrottle
java.lang.Object
org.apache.mina.filter.executor.IoEventQueueThrottle
- All Implemented Interfaces:
- EventListener, IoEventQueueHandler
public class IoEventQueueThrottle
- extends Object
- implements IoEventQueueHandler
Throttles incoming or outgoing events.
- Author:
- Apache MINA Project
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IoEventQueueThrottle
public IoEventQueueThrottle()
IoEventQueueThrottle
public IoEventQueueThrottle(int threshold)
IoEventQueueThrottle
public IoEventQueueThrottle(IoEventSizeEstimator eventSizeEstimator,
int threshold)
getEventSizeEstimator
public IoEventSizeEstimator getEventSizeEstimator()
getThreshold
public int getThreshold()
getCounter
public int getCounter()
setThreshold
public void setThreshold(int threshold)
accept
public boolean accept(Object source,
IoEvent event)
- Description copied from interface:
IoEventQueueHandler
- Returns true if and only if the specified event is
allowed to be offered to the event queue. The event is dropped
if false is returned.
- Specified by:
accept
in interface IoEventQueueHandler
offered
public void offered(Object source,
IoEvent event)
- Description copied from interface:
IoEventQueueHandler
- Invoked after the specified event has been offered to the
event queue.
- Specified by:
offered
in interface IoEventQueueHandler
polled
public void polled(Object source,
IoEvent event)
- Description copied from interface:
IoEventQueueHandler
- Invoked after the specified event has been polled from the
event queue.
- Specified by:
polled
in interface IoEventQueueHandler
block
protected void block()
unblock
protected void unblock()
Copyright © 2004-2011 Apache MINA Project. All Rights Reserved.