org.opennms.bb.dp.poller.scheduler.utils
Class IntervalScheduler

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.opennms.bb.dp.poller.scheduler.utils.IntervalScheduler
All Implemented Interfaces:
Runnable

public class IntervalScheduler
extends Thread


Field Summary
private  boolean m_done
           
private  Iterator m_iterator
           
private  int m_numDequeue
           
private  int m_processRate
           
private  PCQueue m_readyQ
           
private  int m_schedulePeriod
           
private  HashMap m_waitList
          Queue holding NetworkInterface runnables that need to be scheduled
 
Fields inherited from class java.lang.Thread
contextClassLoader, daemon, eetop, group, inheritableThreadLocals, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadLocals, threadQ
 
Constructor Summary
IntervalScheduler(int aSchedulePeriod, PCQueue aReadyQ)
           
 
Method Summary
 void addPollerTask(PollerTask aTask)
           
 Object getNextTask()
           
 int getProcessingRate()
           
 int getScheduleInterval()
           
private  void recalculateParams()
           
 void removePollerTask(PollerTask aTask)
           
 void restart()
           
 void run()
           
 void stopScheduling()
           
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, exit, getContextClassLoader, getName, getPriority, getThreadGroup, init, interrupt, interrupt0, interrupted, isAlive, isDaemon, isInterrupted, isInterrupted, join, join, join, nextThreadNum, registerNatives, resume, resume0, setContextClassLoader, setDaemon, setName, setPriority, setPriority0, sleep, sleep, start, stop, stop, stop0, suspend, suspend0, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_waitList

private HashMap m_waitList
Queue holding NetworkInterface runnables that need to be scheduled

m_readyQ

private PCQueue m_readyQ

m_schedulePeriod

private int m_schedulePeriod

m_numDequeue

private int m_numDequeue

m_processRate

private int m_processRate

m_iterator

private Iterator m_iterator

m_done

private boolean m_done
Constructor Detail

IntervalScheduler

public IntervalScheduler(int aSchedulePeriod,
                         PCQueue aReadyQ)
Method Detail

addPollerTask

public void addPollerTask(PollerTask aTask)

getScheduleInterval

public int getScheduleInterval()

getProcessingRate

public int getProcessingRate()

removePollerTask

public void removePollerTask(PollerTask aTask)

stopScheduling

public void stopScheduling()

restart

public void restart()

recalculateParams

private void recalculateParams()

getNextTask

public Object getNextTask()

run

public void run()
Overrides:
run in class Thread