seda.sandStorm.lib.aSocket
Class DatagramSockState

java.lang.Object
  extended by seda.sandStorm.lib.aSocket.DatagramSockState
All Implemented Interfaces:
aSocketConst
Direct Known Subclasses:
DatagramSockState, DatagramSockState

public abstract class DatagramSockState
extends java.lang.Object
implements aSocketConst

Internal class used to represent state of an active datagram socket.


Field Summary
protected  int clogged_numtries
           
protected  QueueElementIF clogged_qel
           
protected  boolean closed
           
protected  BufferElement cur_write_buf
           
protected  AUdpWriteRequest cur_write_req
           
private static boolean DEBUG
           
protected  int maxPacketSize
           
protected  int numEmptyWrites
           
protected  int outstanding_writes
           
protected  AUdpInPacket pkt
           
protected  byte[] readBuf
           
protected  int readClogTries
           
protected  SinkIF readCompQ
           
protected  long seqNum
           
protected  AUdpSocket udpsock
           
protected  int writeClogThreshold
           
protected  ssLinkedList writeReqList
           
 
Fields inherited from interface seda.sandStorm.lib.aSocket.aSocketConst
EVENT_QUEUE_SPIN, EVENT_QUEUE_TIMEOUT, LARGE_AGGREGATION, LISTENSTAGE_NAME, MAX_ACCEPTS_AT_ONCE, MAX_WRITE_LEN, MAX_WRITE_REQS_PER_SOCKET, MAX_WRITES_AT_ONCE, MEASUREMENT_SIZE, READ_BUFFER_COPY, READ_BUFFER_SIZE, READSTAGE_NAME, SELECT_SPIN, SELECT_TIMEOUT, TRYWRITE_SPIN, WRITE_MASK_DISABLE_THRESHOLD, WRITESTAGE_NAME
 
Constructor Summary
DatagramSockState()
           
 
Method Summary
protected abstract  boolean addWriteRequest(aSocketRequest req, SourceIF write_selsource)
           
protected abstract  void close(SinkIF closeEventQueue)
           
protected abstract  void connect(java.net.InetAddress addr, int port)
           
protected abstract  void doRead()
           
protected abstract  java.net.DatagramSocket getSocket()
           
(package private)  void initWrite(AUdpWriteRequest req)
           
(package private)  boolean isClosed()
           
protected abstract  void readInit(SelectSourceIF read_selsource, SinkIF compQ, int readClogTries)
           
protected abstract  boolean tryWrite()
           
protected abstract  void writeMaskDisable()
           
protected abstract  void writeMaskEnable()
           
(package private)  void writeReset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values

udpsock

protected AUdpSocket udpsock

readCompQ

protected SinkIF readCompQ

clogged_qel

protected QueueElementIF clogged_qel

clogged_numtries

protected int clogged_numtries

readClogTries

protected int readClogTries

writeClogThreshold

protected int writeClogThreshold

maxPacketSize

protected int maxPacketSize

readBuf

protected byte[] readBuf

closed

protected boolean closed

seqNum

protected long seqNum

pkt

protected AUdpInPacket pkt

outstanding_writes

protected int outstanding_writes

numEmptyWrites

protected int numEmptyWrites

writeReqList

protected ssLinkedList writeReqList

cur_write_req

protected AUdpWriteRequest cur_write_req

cur_write_buf

protected BufferElement cur_write_buf
Constructor Detail

DatagramSockState

public DatagramSockState()
Method Detail

readInit

protected abstract void readInit(SelectSourceIF read_selsource,
                                 SinkIF compQ,
                                 int readClogTries)

doRead

protected abstract void doRead()

addWriteRequest

protected abstract boolean addWriteRequest(aSocketRequest req,
                                           SourceIF write_selsource)

tryWrite

protected abstract boolean tryWrite()
                             throws SinkClosedException
Throws:
SinkClosedException

writeMaskEnable

protected abstract void writeMaskEnable()

writeMaskDisable

protected abstract void writeMaskDisable()

close

protected abstract void close(SinkIF closeEventQueue)

getSocket

protected abstract java.net.DatagramSocket getSocket()

connect

protected abstract void connect(java.net.InetAddress addr,
                                int port)

initWrite

void initWrite(AUdpWriteRequest req)

writeReset

void writeReset()

isClosed

boolean isClosed()