seda.sandStorm.lib.aSocket.nio
Class SockState

java.lang.Object
  extended byseda.sandStorm.lib.aSocket.SockState
      extended byseda.sandStorm.lib.aSocket.nio.SockState
All Implemented Interfaces:
aSocketConst

public class SockState
extends SockState

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


Field Summary
 
Fields inherited from class seda.sandStorm.lib.aSocket.SockState
clogged_numtries, clogged_qel, closed, conn, cur_length_target, cur_offset, cur_write_req, nbsock, numActiveWriteSockets, numEmptyWrites, outstanding_writes, pkt, readBuf, readClogTries, readCompQ, seqNum, writeBuf, writeClogThreshold, 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
(package private) SockState(ATcpConnection conn, java.net.Socket nbsock, int writeClogThreshold)
           
  SockState(ATcpConnection conn, java.net.Socket nbsock, java.lang.Integer writeClogThreshold)
           
 
Method Summary
protected  boolean addWriteRequest(aSocketRequest req, SelectSourceIF write_selsource)
           
protected  void close(SinkIF closeEventQueue)
           
protected  void doRead()
           
protected  void initWrite(ATcpWriteRequest req)
           
protected  void readInit(SelectSourceIF read_selsource, SinkIF compQ, int readClogTries)
           
protected  boolean tryWrite()
           
protected  void writeMaskDisable()
           
protected  void writeMaskEnable()
           
 
Methods inherited from class seda.sandStorm.lib.aSocket.SockState
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SockState

SockState(ATcpConnection conn,
          java.net.Socket nbsock,
          int writeClogThreshold)
    throws java.io.IOException

SockState

public SockState(ATcpConnection conn,
                 java.net.Socket nbsock,
                 java.lang.Integer writeClogThreshold)
          throws java.io.IOException
Method Detail

readInit

protected void readInit(SelectSourceIF read_selsource,
                        SinkIF compQ,
                        int readClogTries)
Specified by:
readInit in class SockState

doRead

protected void doRead()
Specified by:
doRead in class SockState

addWriteRequest

protected boolean addWriteRequest(aSocketRequest req,
                                  SelectSourceIF write_selsource)
Specified by:
addWriteRequest in class SockState

initWrite

protected void initWrite(ATcpWriteRequest req)
Specified by:
initWrite in class SockState

tryWrite

protected boolean tryWrite()
                    throws SinkClosedException
Specified by:
tryWrite in class SockState
Throws:
SinkClosedException

writeMaskEnable

protected void writeMaskEnable()
Specified by:
writeMaskEnable in class SockState

writeMaskDisable

protected void writeMaskDisable()
Specified by:
writeMaskDisable in class SockState

close

protected void close(SinkIF closeEventQueue)
Specified by:
close in class SockState