SSF.OS
Class IP.demux_cache

java.lang.Object
  |
  +--SSF.OS.IP.demux_cache
Enclosing class:
IP

protected final class IP.demux_cache
extends java.lang.Object

demux_cache: class internal to IP, used for rapid demultiplexing of protocol numbers to protocol session instances. Two dynamic arrays are maintained: a list of protocol numbers and a list of protocol sessions. These lists are unordered, but the most recently requested protocol number may always be found in slot 0.


Field Summary
(package private)  int curr
           
(package private)  int INITIAL_CACHE_SIZE
           
(package private)  int max
           
(package private)  int[] numbers
           
(package private)  ProtocolSession[] sessions
           
 
Constructor Summary
IP.demux_cache()
           
 
Method Summary
 ProtocolSession demux(int pnum)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

curr

int curr

max

int max

numbers

int[] numbers

sessions

ProtocolSession[] sessions

INITIAL_CACHE_SIZE

final int INITIAL_CACHE_SIZE
See Also:
Constant Field Values
Constructor Detail

IP.demux_cache

public IP.demux_cache()
Method Detail

demux

public final ProtocolSession demux(int pnum)
                            throws ProtocolException
ProtocolException