|
barchart-udt-core 2.3.0-SNAPSHOT / 2013-05-13T01:37:38.485-0500 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.nio.channels.Selector
java.nio.channels.spi.AbstractSelector
com.barchart.udt.nio.SelectorUDT
public class SelectorUDT
selector
design guidelines:
1) follow general contracts of jdk 6 nio; see barchart-udt-reference-jdk6
2) adapt to how netty is doing select; see NioEventLoop
note: you must use SelectorProviderUDT.openSelector() to obtain
instance of this class; do not use JDK
Selector.open()
| Field Summary | |
|---|---|
protected static org.slf4j.Logger |
log
|
int |
maximimSelectorSize
|
| Constructor Summary | |
|---|---|
protected |
SelectorUDT(SelectorProvider provider,
int maximumSelectorSize)
|
| Method Summary | |
|---|---|
protected void |
cancel(SelectionKeyUDT keyUDT)
Enqueue cancel request. |
protected void |
doCancel()
Process pending cancel requests. |
protected int |
doEpollEnter(long millisTimeout)
|
protected int |
doEpollExclusive(long millisTimeout)
|
protected int |
doEpollSelect(long millisTimeout)
|
protected int |
doEpollSelectUDT(long timeout)
|
protected void |
doResults()
|
protected void |
doResultsRead(int resultIndex)
|
protected void |
doResultsWrite(int resultIndex)
|
protected EpollUDT |
epollUDT()
|
protected void |
implCloseSelector()
|
Set<SelectionKey> |
keys()
|
protected void |
logSocketId(String title,
int socketId)
|
protected static Selector |
open(TypeUDT type)
use this call to instantiate a selector for UDT |
protected SelectionKey |
register(AbstractSelectableChannel channel,
int interestOps,
Object attachment)
|
int |
select()
|
int |
select(long timeout)
|
Set<SelectionKey> |
selectedKeys()
|
int |
selectNow()
|
Selector |
wakeup()
|
protected boolean |
wakeupIsPending()
|
protected void |
wakeupMarkBase()
|
| Methods inherited from class java.nio.channels.spi.AbstractSelector |
|---|
begin, cancelledKeys, close, deregister, end, isOpen, provider |
| Methods inherited from class java.nio.channels.Selector |
|---|
open |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.slf4j.Logger log
public final int maximimSelectorSize
| Constructor Detail |
|---|
protected SelectorUDT(SelectorProvider provider,
int maximumSelectorSize)
throws ExceptionUDT
ExceptionUDT| Method Detail |
|---|
protected static Selector open(TypeUDT type)
throws IOException
IOExceptionprotected void cancel(SelectionKeyUDT keyUDT)
protected void doCancel()
protected int doEpollEnter(long millisTimeout)
throws IOException
millisTimeout - <0 : invinite; =0 : immediate; >0 : finite;
IOException
protected int doEpollExclusive(long millisTimeout)
throws IOException
millisTimeout - <0 : invinite;
=0 : immediate;
>0 : finite;
IOException
protected int doEpollSelect(long millisTimeout)
throws ExceptionUDT
millisTimeout - <0 : infinite
=0 : immediate
>0 : finite
ExceptionUDT
protected int doEpollSelectUDT(long timeout)
throws ExceptionUDT
ExceptionUDTprotected void doResults()
protected void doResultsRead(int resultIndex)
protected void doResultsWrite(int resultIndex)
protected EpollUDT epollUDT()
protected void implCloseSelector()
throws IOException
implCloseSelector in class AbstractSelectorIOExceptionpublic Set<SelectionKey> keys()
keys in class Selector
protected void logSocketId(String title,
int socketId)
protected SelectionKey register(AbstractSelectableChannel channel,
int interestOps,
Object attachment)
register in class AbstractSelector
public int select()
throws IOException
select in class SelectorIOException
public int select(long timeout)
throws IOException
select in class SelectorIOExceptionpublic Set<SelectionKey> selectedKeys()
selectedKeys in class Selector
public int selectNow()
throws IOException
selectNow in class SelectorIOExceptionpublic Selector wakeup()
wakeup in class Selectorprotected boolean wakeupIsPending()
protected void wakeupMarkBase()
|
barchart-udt-core 2.3.0-SNAPSHOT / 2013-05-13T01:37:38.485-0500 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||