public final class OFMessageDamper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
OFMessageDamper.DamperEntry
An entry in the TimedCache.
|
| Modifier and Type | Field and Description |
|---|---|
private TimedCache<OFMessageDamper.DamperEntry> |
cache |
private java.util.EnumSet<org.openflow.protocol.OFType> |
msgTypesToCache |
| Constructor and Description |
|---|
OFMessageDamper(int capacity,
java.util.Set<org.openflow.protocol.OFType> typesToDampen,
int timeout) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
write(Connection conn,
org.openflow.protocol.OFMessage msg)
write the messag to the switch according to our dampening settings
|
private TimedCache<OFMessageDamper.DamperEntry> cache
private java.util.EnumSet<org.openflow.protocol.OFType> msgTypesToCache
public OFMessageDamper(int capacity,
java.util.Set<org.openflow.protocol.OFType> typesToDampen,
int timeout)
capacity - the maximum number of messages that should be
kepttypesToDampen - The set of OFMessageTypes that should be
dampened by this instance. Other types will be passed throughtimeout - The dampening timeout. A message will only be
written if the last write for the an equal message more than
timeout ms ago.public boolean write(Connection conn, org.openflow.protocol.OFMessage msg) throws java.io.IOException
sw - msg - java.io.IOException