|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.clackrouter.component.base.ClackComponent net.clackrouter.component.base.Queue net.clackrouter.component.extension.FlowByteQueue
public class FlowByteQueue
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.clackrouter.component.base.ClackComponent |
---|
ClackComponent.Waiter |
Field Summary | |
---|---|
static int |
AVG_INTERVAL_MSEC
|
static int |
DEFAULT_MAX_IDLE_TIME
|
static int |
DEFAULT_MAX_SIZE
|
protected java.util.Hashtable |
m_flowsize_map
|
protected ClackOccData |
m_occ_flowdata
|
protected java.util.ArrayList |
m_queue
|
static int |
STALE_CHECK_INTERVAL
|
protected java.util.Date |
startTime
|
static int |
UPDATE_INTERVAL_MSEC
|
static int |
VISIBLE_TIME_INTERVAL
|
Fields inherited from class net.clackrouter.component.base.Queue |
---|
DEFAULT_SIZE, m_max_size, m_recent_drop, m_total_drops, mQueueOccData, NUM_PORTS, PORT_HEAD, PORT_TAIL |
Fields inherited from class net.clackrouter.component.base.ClackComponent |
---|
componentCell, m_has_error, m_log, m_name, m_num_ports, m_packetcount_in, m_packetcount_out, m_ports, mListeners, mRouter, pendingError, SIGNAL_ERROR_LEN_MSEC, UNIQUE_COUNT, view |
Constructor Summary | |
---|---|
FlowByteQueue(Router router,
java.lang.String name)
|
|
FlowByteQueue(Router router,
java.lang.String name,
int max_bytes)
|
Method Summary | |
---|---|
void |
acceptPacket(VNSPacket packet,
int port_number)
Add packet to the queue if the additional bytes can be stored without exceeding max size, otherwise drop. |
void |
clearAllFlowInformation()
|
ClackOccData |
getMultiSeriesOccData()
Provides data of queue occupancy vs time for real-time graphs. |
int |
getOccupancy()
The current occupancy of the queue |
javax.swing.JPanel |
getPropertiesView()
Method for getting the properties view associated with this component Property views are used to display more detailed information about internal component state. |
java.util.Properties |
getSerializableProperties(boolean isTransient)
Serialize the queue's size for reloading the router |
VNSPacket |
handlePullRequest(int port_number)
Pull a packet from the head of the queue |
void |
initializeProperties(java.util.Properties props)
Load the saved size value |
protected void |
packet_added(VNSPacket p,
boolean is_drop)
updates graph and GUI queue when packet has been added to the queue |
protected void |
packet_removed(VNSPacket p)
updates graph and GUI queue when packet has been removed from the queue |
Methods inherited from class net.clackrouter.component.base.Queue |
---|
getMaxOccupancy, getQueueOccData, getTotalDropped, getView, isModifying, queueOccupancyChanged, recentDropTest, setMaxOccupancy, setupPorts |
Methods inherited from class net.clackrouter.component.base.ClackComponent |
---|
createCopy, createInputPullPort, createInputPushPort, createOutputPullPort, createOutputPushPort, error, fireListeners, getColor, getComponentCell, getHierarchicalView, getLog, getName, getNumPorts, getPacketCountIn, getPacketCountOut, getPendingError, getPort, getRouter, getTime, getTypeName, getUniqueCount, hasError, isHierarchical, log, notifyAlarm, poll, registerListener, sendOutPort, setAlarm, setComponentCell, setName, setPendingError, setView, showErrorDialog, signalError, try_repaint, unregisterListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int DEFAULT_MAX_SIZE
protected java.util.Date startTime
protected java.util.ArrayList m_queue
protected ClackOccData m_occ_flowdata
protected java.util.Hashtable m_flowsize_map
public static int AVG_INTERVAL_MSEC
public static int UPDATE_INTERVAL_MSEC
public static int STALE_CHECK_INTERVAL
public static int DEFAULT_MAX_IDLE_TIME
public static int VISIBLE_TIME_INTERVAL
Constructor Detail |
---|
public FlowByteQueue(Router router, java.lang.String name)
public FlowByteQueue(Router router, java.lang.String name, int max_bytes)
Method Detail |
---|
public void acceptPacket(VNSPacket packet, int port_number)
acceptPacket
in class Queue
packet
- The pushed packetport_number
- The number of the port that this packet is arriving onpublic VNSPacket handlePullRequest(int port_number)
handlePullRequest
in class Queue
port_number
- The port that a packet is being requested on
public int getOccupancy()
Queue
getOccupancy
in class Queue
protected void packet_added(VNSPacket p, boolean is_drop)
protected void packet_removed(VNSPacket p)
public ClackOccData getMultiSeriesOccData()
public javax.swing.JPanel getPropertiesView()
ClackComponent
getPropertiesView
in class Queue
public java.util.Properties getSerializableProperties(boolean isTransient)
getSerializableProperties
in class Queue
isTransient
- flag indicating if serialization is transient
public void initializeProperties(java.util.Properties props)
initializeProperties
in class Queue
props
- all property values serialized for this componentpublic void clearAllFlowInformation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |