More information: http://www.cs.berkeley.edu/~mdw/proj/seda/

mdw.sandStorm.lib.aSocket
Class SockState

java.lang.Object
  |
  +--mdw.sandStorm.lib.aSocket.SockState
All Implemented Interfaces:
aSocketConst

class SockState
extends java.lang.Object
implements aSocketConst

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


Field Summary
(package private)  boolean closed
           
(package private)  ATcpConnection conn
           
(package private)  ATcpWriteRequest cur_write_req
           
(package private)  int numEmptyWrites
           
(package private)  int outstanding_writes
           
(package private)  long seqNum
           
(package private)  ssLinkedList writeReqList
           
 
Fields inherited from interface mdw.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, NonblockingSocket nbsock, int writeClogThreshold)
           
 
Method Summary
(package private)  boolean addWriteRequest(aSocketRequest req, SelectSource write_selsource)
           
(package private)  void close(SinkIF closeEventQueue)
           
(package private)  void doRead()
           
(package private)  void initWrite(ATcpWriteRequest req)
           
(package private)  boolean isClosed()
           
(package private) static int numActiveWriters()
           
(package private)  void readInit(SelectSource read_selsource, SinkIF compQ, int readClogTries)
           
 java.lang.String toString()
           
(package private)  boolean tryWrite()
           
(package private)  void writeMaskDisable()
           
(package private)  void writeMaskEnable()
           
(package private)  void writeReset()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

conn

ATcpConnection conn

closed

boolean closed

seqNum

long seqNum

outstanding_writes

int outstanding_writes

numEmptyWrites

int numEmptyWrites

writeReqList

ssLinkedList writeReqList

cur_write_req

ATcpWriteRequest cur_write_req
Constructor Detail

SockState

SockState(ATcpConnection conn,
          NonblockingSocket nbsock,
          int writeClogThreshold)
    throws java.io.IOException
Method Detail

readInit

void readInit(SelectSource read_selsource,
              SinkIF compQ,
              int readClogTries)

doRead

void doRead()

addWriteRequest

boolean addWriteRequest(aSocketRequest req,
                        SelectSource write_selsource)

initWrite

void initWrite(ATcpWriteRequest req)

tryWrite

boolean tryWrite()
           throws SinkClosedException

writeReset

void writeReset()

writeMaskEnable

void writeMaskEnable()

writeMaskDisable

void writeMaskDisable()

numActiveWriters

static int numActiveWriters()

isClosed

boolean isClosed()

close

void close(SinkIF closeEventQueue)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

More information: http://www.cs.berkeley.edu/~mdw/proj/seda/