simnet
Class SimpleDropPolicy
java.lang.Object
simnet.DropPolicy
simnet.SimpleDropPolicy
- All Implemented Interfaces:
- Pluggable
- public class SimpleDropPolicy
- extends DropPolicy
- implements Pluggable
An example of a trivial drop policy.
Note that this early dropper will only drop packets that
would have been dropped anyway due to lack of space in the
transmission buffer.
|
Method Summary |
boolean |
earlyDropPacket(Frame f,
int remaining_bytes)
Drop the packet if we don't have enough room. |
boolean |
prePlugout(java.lang.Object replacement)
No special cleanup is required. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
packet_count
protected int packet_count
last
protected java.util.Date last
SimpleDropPolicy
public SimpleDropPolicy()
earlyDropPacket
public boolean earlyDropPacket(Frame f,
int remaining_bytes)
- Drop the packet if we don't have enough room.
Note that this is redundant since this is the same criteria that
the link will use to drop the packet anyway.
That is, this is just here as an example.
- Specified by:
earlyDropPacket in class DropPolicy
prePlugout
public boolean prePlugout(java.lang.Object replacement)
- No special cleanup is required.
- Specified by:
prePlugout in interface Pluggable
- Returns:
- if this object can now be removed (was the operation sucessful)