|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjist.swans.trans.PriorityList
public class PriorityList
Data structure that holds TCP message and sorts them based on their sequence numbers.
| Field Summary | |
|---|---|
private java.util.List |
llist
List of messages. |
| Constructor Summary | |
|---|---|
PriorityList()
Constructor. |
|
| Method Summary | |
|---|---|
int |
find(int seqNum)
Find a TCP message given the sequence number. |
void |
insert(TransTcp.TcpMessage msg)
Insert a message to the possible priority list. |
void |
printList()
This method is used to print out the list content. |
void |
removeMessage(int seqNum)
Removing a specific message. |
void |
removeMessages(int seqNum)
Removing all messages that have number less than the given number. |
TransTcp.TcpMessage |
retrieve(int seqNum)
Retrieve a message with given sequence number. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.List llist
| Constructor Detail |
|---|
public PriorityList()
| Method Detail |
|---|
public void insert(TransTcp.TcpMessage msg)
msg - TCP message to be insertedpublic int find(int seqNum)
seqNum - sequence number of message to search
public TransTcp.TcpMessage retrieve(int seqNum)
seqNum - sequence number of the message
public void removeMessage(int seqNum)
seqNum - sequence number of message to be removedpublic void removeMessages(int seqNum)
seqNum - messages with sequence number lower than this
will be removedpublic void printList()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||