public class ClosedFlowsQueue
extends java.lang.Object
ClosedFlowsQueue is responsible for storing closed flows.
Closed flows stored there by FlowGenerator await to be processed by DatabaseHandler
and stored into the database.| Modifier and Type | Field and Description |
|---|---|
private java.util.Queue<Flow> |
closedFlowsQueue
Queue of closed flows.
|
private int |
numberOfFlows
Number of closed flows in the queue.
|
private int |
numberOfPackets
Number of packets belonging to all the closed flows stored in the queue.
|
| Constructor and Description |
|---|
ClosedFlowsQueue() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addClosedFlow(Flow flow)
Adds a closed flow to the queue.
|
int |
getNumberOfFlows()
Gets number of closed flows in the queue.
|
int |
getNumberOfPackets()
Gets number of packets belonging to all the closed flows in the queue.
|
Flow |
takeClosedFlow()
Takes the first closed flow from the queue.
|
private java.util.Queue<Flow> closedFlowsQueue
private int numberOfFlows
private int numberOfPackets
protected boolean addClosedFlow(Flow flow)
flow - flow to be added to the queuetrue if the flow was added, false otherwisepublic Flow takeClosedFlow()
public int getNumberOfFlows()
public int getNumberOfPackets()