| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | TokenTracker.
An entry in the list that represents the sequence of received tokens. |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private final int | |
| private final LinkedList | |
| pack-priv static final int | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | add(int number, int prevEntryPos)
Adds the number to the list just after the entry that is currently at position prevEntryPos. |
| private int | |
| public final synchronized void | getProps(int number, MessageProp prop)
Sets the sequencing and replay information for the given token number. |
| public String |
| expectedNumber | back to summary |
|---|---|
| private int expectedNumber | |
| initNumber | back to summary |
|---|---|
| private final int initNumber | |
| list | back to summary |
|---|---|
| private final LinkedList<TokenTracker. | |
| MAX_INTERVALS | back to summary |
|---|---|
| pack-priv static final int MAX_INTERVALS | |
| windowStart | back to summary |
|---|---|
| private int windowStart | |
| windowStartIndex | back to summary |
|---|---|
| private int windowStartIndex | |
| TokenTracker | back to summary |
|---|---|
| public TokenTracker(int initNumber) | |
| add | back to summary |
|---|---|
| private void add(int number, int prevEntryPos) Adds the number to the list just after the entry that is currently at position prevEntryPos. If prevEntryPos is -1, then the number will begin a new interval at the front of the list. | |
| getIntervalIndex | back to summary |
|---|---|
| private int getIntervalIndex(int number) Returns the index for the entry into which this number will fit. If there is none, it returns the index of the last interval which precedes this number. It returns -1 if the number needs to be a in a new interval ahead of the whole list. | |
| getProps | back to summary |
|---|---|
| public final synchronized void getProps(int number, MessageProp prop) Sets the sequencing and replay information for the given token number. The following represents the number line with positions of initNumber, windowStart, expectedNumber marked on it. Regions in between them show the different sequencing and replay state possibilities for tokens that fall in there. (1) windowStart initNumber expectedNumber | | ---|---------------------------|--- GAP | DUP/UNSEQ | GAP (2) initNumber windowStart expectedNumber | | | ---|---------------|--------------|--- GAP | OLD | DUP/UNSEQ | GAP (3) windowStart expectedNumber initNumber | | ---|---------------------------|--- DUP/UNSEQ | GAP | DUP/UNSEQ (4) expectedNumber initNumber windowStart | | | ---|---------------|--------------|--- DUP/UNSEQ | GAP | OLD | DUP/UNSEQ (5) windowStart expectedNumber initNumber | | | ---|---------------|--------------|--- OLD | DUP/UNSEQ | GAP | OLD (This analysis leaves out the possibility that expectedNumber passes initNumber after wrapping around. That may be added later.) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv final void | |
| pack-priv final int | compareTo(int number)
Returns -1 if this interval represented by this entry precedes the number, 0 if the number is contained in the interval, and -1 if the interval occurs after the number. |
| pack-priv final boolean | |
| pack-priv final int | |
| pack-priv final int | |
| pack-priv final void | |
| pack-priv final void | |
| pack-priv final void | |
| public String |
| Entry | back to summary |
|---|---|
| pack-priv Entry(int number) | |
| append | back to summary |
|---|---|
| pack-priv final void append(int number) | |
| compareTo | back to summary |
|---|---|
| pack-priv final int compareTo(int number) Returns -1 if this interval represented by this entry precedes the number, 0 if the number is contained in the interval, and -1 if the interval occurs after the number. | |
| contains | back to summary |
|---|---|
| pack-priv final boolean contains(int number) | |
| getEnd | back to summary |
|---|---|
| pack-priv final int getEnd() | |
| getStart | back to summary |
|---|---|
| pack-priv final int getStart() | |
| setEnd | back to summary |
|---|---|
| pack-priv final void setEnd(int end) | |
| setInterval | back to summary |
|---|---|
| pack-priv final void setInterval(int start, int end) | |
| setStart | back to summary |
|---|---|
| pack-priv final void setStart(int start) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |