simnet
Class DropPolicy

java.lang.Object
  extended bysimnet.DropPolicy
Direct Known Subclasses:
SimpleDropPolicy

public abstract class DropPolicy
extends java.lang.Object

An early dropper for a link's transmission queue.


Field Summary
protected  int qsize
          The transmission queue size on the link this drop policy is for.
 
Constructor Summary
DropPolicy()
           
 
Method Summary
abstract  boolean earlyDropPacket(Frame f, int remaining_bytes)
          Given a packet (inside a frame), and the bytes remaining in the queue, returns if the packet should be dropped.
protected  void finalize()
          For debugging
 void initialize(int new_qsize)
          Called when it first gets plugged in
 void updateSize(int new_qsize)
          Called when the size of the queue gets changed.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

qsize

protected int qsize
The transmission queue size on the link this drop policy is for.

Constructor Detail

DropPolicy

public DropPolicy()
Method Detail

initialize

public void initialize(int new_qsize)
Called when it first gets plugged in


updateSize

public void updateSize(int new_qsize)
Called when the size of the queue gets changed. A size of -1 means infinite sized buffer.


earlyDropPacket

public abstract boolean earlyDropPacket(Frame f,
                                        int remaining_bytes)
Given a packet (inside a frame), and the bytes remaining in the queue, returns if the packet should be dropped. If remaining bytes is -1, then the queue is of unlimited size. If there is insufficient space remaining on the queue, the packet will be dropped regardless of what is returned.


finalize

protected void finalize()
For debugging