Package org.jruby.util.io
Class SelectExecutor
java.lang.Object
org.jruby.util.io.SelectExecutor
Created by headius on 6/3/14.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) List<SelectExecutor.ENXIOSelector>(package private) List<SelectionKey>(package private) final IRubyObject(package private) Selector(package private) final IRubyObjectstatic final int(package private) List<SelectionKey>(package private) final Rubyprivate static final RubyThread.Task<SelectExecutor,Integer> (package private) Long(package private) final IRubyObjectstatic final int(package private) List<SelectionKey> -
Constructor Summary
ConstructorsConstructorDescriptionSelectExecutor(IRubyObject read, IRubyObject write, IRubyObject except, Long timeout) -
Method Summary
Modifier and TypeMethodDescriptionprivate intdoSelect(ThreadContext context) private booleanfdIsSet(List<SelectionKey> fds, ChannelFD fd, int operations) private voidfdSetRead(ThreadContext context, ChannelFD fd, int maxSize) private voidfdSetWrite(ThreadContext context, ChannelFD fd, int maxSize) private SelectorgetSelector(ThreadContext context, SelectableChannel channel) go(ThreadContext context) private intprivate intprivate static SelectionKeyregisterSelect(Selector selector, ChannelFD attachment, SelectableChannel channel, int ops) (package private) IRubyObjectselectCall(ThreadContext context) (package private) IRubyObjectselectEnd(ThreadContext context) (package private) IRubyObjectselectInternal(ThreadContext context) private intthreadFdSelect(ThreadContext context) private SelectionKeytrySelectRead(ThreadContext context, ChannelFD fd) private SelectionKeytrySelectWrite(ThreadContext context, ChannelFD fd)
-
Field Details
-
SelectTask
-
read
-
write
-
except
-
readKeyList
List<SelectionKey> readKeyList -
writeKeyList
List<SelectionKey> writeKeyList -
errorKeyList
List<SelectionKey> errorKeyList -
unselectableReadFDs
-
unselectableWriteFDs
-
pendingReadFDs
-
mainSelector
Selector mainSelector -
selectors
-
enxioSelectors
List<SelectExecutor.ENXIOSelector> enxioSelectors -
timeout
Long timeout -
runtime
-
READ_ACCEPT_OPS
public static final int READ_ACCEPT_OPS- See Also:
-
WRITE_CONNECT_OPS
public static final int WRITE_CONNECT_OPS- See Also:
-
-
Constructor Details
-
SelectExecutor
-
-
Method Details
-
go
-
selectCall
- Throws:
IOException
-
selectEnd
- Throws:
IOException
-
selectInternal
- Throws:
IOException
-
maxReadReadySize
private int maxReadReadySize() -
maxWriteReadySize
private int maxWriteReadySize() -
fdSetRead
- Throws:
IOException
-
fdSetWrite
- Throws:
IOException
-
fdIsSet
-
trySelectRead
- Throws:
IOException
-
trySelectWrite
- Throws:
IOException
-
getSelector
- Throws:
IOException
-
registerSelect
private static SelectionKey registerSelect(Selector selector, ChannelFD attachment, SelectableChannel channel, int ops) throws IOException - Throws:
IOException
-
threadFdSelect
- Throws:
IOException
-
doSelect
-