org.red5.server.net.filter
Class IoEventQueueThrottler

java.lang.Object
  extended by org.red5.server.net.filter.IoEventQueueThrottler
All Implemented Interfaces:
EventListener, IoEventQueueHandler

public class IoEventQueueThrottler
extends Object
implements IoEventQueueHandler

Throttles incoming or outgoing events. The basis for this version originated in the Apache MINA Project.

Author:
Paul Gregoire ([email protected])

Field Summary
 
Fields inherited from interface org.apache.mina.filter.executor.IoEventQueueHandler
NOOP
 
Constructor Summary
IoEventQueueThrottler(int threshold, int permits)
           
IoEventQueueThrottler(IoEventSizeEstimator eventSizeEstimator, int threshold, int permits)
           
 
Method Summary
 boolean accept(Object source, IoEvent event)
           
 int getCounter()
           
 IoEventSizeEstimator getEventSizeEstimator()
           
 int getThreshold()
           
 void offered(Object source, IoEvent event)
           
 void polled(Object source, IoEvent event)
           
 void setThreshold(int threshold)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IoEventQueueThrottler

public IoEventQueueThrottler(int threshold,
                             int permits)

IoEventQueueThrottler

public IoEventQueueThrottler(IoEventSizeEstimator eventSizeEstimator,
                             int threshold,
                             int permits)
Method Detail

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)
Specified by:
accept in interface IoEventQueueHandler

offered

public void offered(Object source,
                    IoEvent event)
Specified by:
offered in interface IoEventQueueHandler

polled

public void polled(Object source,
                   IoEvent event)
Specified by:
polled in interface IoEventQueueHandler


Copyright © 2006-2012 The Red5 Project