/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | SelectionKeyTest.java | 24 import java.nio.channels.SelectionKey; 38 SelectionKey selectionKey; 47 selectionKey = sc.register(selector, SelectionKey.OP_CONNECT); in setUp() 58 static class MockSelectionKey extends SelectionKey { 77 public SelectionKey interestOps(int operations) { in interestOps() 98 MockSelectionKey mockSelectionKey = new MockSelectionKey(SelectionKey.OP_ACCEPT); in test_attach() 116 MockSelectionKey mockSelectionKey = new MockSelectionKey(SelectionKey.OP_ACCEPT); in test_attachment() 137 assertEquals(SelectionKey.OP_CONNECT, selectionKey.interestOps()); in test_interestOps() 144 selectionKey.interestOps(SelectionKey.OP_WRITE); in test_interestOpsI() 145 assertEquals(SelectionKey.OP_WRITE, selectionKey.interestOps()); in test_interestOpsI() [all …]
|
D | SelectorTest.java | 26 import java.nio.channels.SelectionKey; 105 SelectionKey key = ssc.register(selector, SelectionKey.OP_ACCEPT); in test_keys() 107 Set<SelectionKey> keySet = selector.keys(); in test_keys() 108 Set<SelectionKey> keySet2 = selector.keys(); in test_keys() 112 SelectionKey key2 = keySet.iterator().next(); in test_keys() 118 SelectionKey key3 = sc.register(selector, SelectionKey.OP_READ); in test_keys() 152 ssc.register(selector, SelectionKey.OP_ACCEPT); in test_selectedKeys() 158 Set<SelectionKey> selectedKeys = selector.selectedKeys(); in test_selectedKeys() 159 Set<SelectionKey> selectedKeys2 = selector.selectedKeys(); in test_selectedKeys() 175 Set<SelectionKey> selectedKeys3 = selector.selectedKeys(); in test_selectedKeys() [all …]
|
D | UnixSelectorTest.java | 22 import java.nio.channels.SelectionKey; 65 SelectionKey mkey0 = server.serverChannel.register(sel0, SelectionKey.OP_ACCEPT); in testSelectorAcceptAndRead() 66 server.serverChannel.register(sel1, SelectionKey.OP_ACCEPT); in testSelectorAcceptAndRead() 79 socketChannel.register(sel2, SelectionKey.OP_WRITE); in testSelectorAcceptAndRead() 96 SelectionKey mkey3 = socketChannel2.register(sel3, SelectionKey.OP_WRITE); in testSelectUnConnectedChannel() 105 SelectionKey mkey4 = socketChannel2.register(sel4, SelectionKey.OP_CONNECT); in testSelectUnConnectedChannel() 111 …SelectionKey mkey5 = socketChannel2.register(sel5, SelectionKey.OP_CONNECT | SelectionKey.OP_WRITE… in testSelectUnConnectedChannel()
|
D | SelectableChannelTest.java | 22 import java.nio.channels.SelectionKey; 40 msc.register(Selector.open(), SelectionKey.OP_ACCEPT); in test_register_LSelectorI() 65 public SelectionKey keyFor(Selector sel) { in keyFor() 73 public SelectionKey register(Selector sel, int ops, Object att) in register()
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | SelectorImpl.java | 44 protected Set<SelectionKey> selectedKeys; 47 protected HashSet<SelectionKey> keys; 50 private Set<SelectionKey> publicKeys; // Immutable 51 private Set<SelectionKey> publicSelectedKeys; // Removal allowed, but not addition 55 keys = new HashSet<SelectionKey>(); in SelectorImpl() 56 selectedKeys = new HashSet<SelectionKey>(); in SelectorImpl() 66 public Set<SelectionKey> keys() { in keys() 72 public Set<SelectionKey> selectedKeys() { in selectedKeys() 123 protected final SelectionKey register(AbstractSelectableChannel ch, in register() 142 Set<SelectionKey> cks = cancelledKeys(); in processDeregisterQueue() [all …]
|
D | SelectionKeyImpl.java | 81 public SelectionKey interestOps(int ops) { in interestOps() 102 public SelectionKey nioInterestOps(int ops) { in nioInterestOps()
|
D | SinkChannelImpl.java | 131 ((intOps & SelectionKey.OP_WRITE) != 0)) in translateReadyOps() 132 newOps |= SelectionKey.OP_WRITE; in translateReadyOps() 147 if (ops == SelectionKey.OP_WRITE) in translateAndSetInterestOps()
|
D | SocketChannelImpl.java | 47 import java.nio.channels.SelectionKey; 975 ((intOps & SelectionKey.OP_READ) != 0) && in translateReadyOps() 977 newOps |= SelectionKey.OP_READ; in translateReadyOps() 980 ((intOps & SelectionKey.OP_CONNECT) != 0) && in translateReadyOps() 982 newOps |= SelectionKey.OP_CONNECT; in translateReadyOps() 987 ((intOps & SelectionKey.OP_WRITE) != 0) && in translateReadyOps() 989 newOps |= SelectionKey.OP_WRITE; in translateReadyOps() 1030 if ((ops & SelectionKey.OP_READ) != 0) in translateAndSetInterestOps() 1032 if ((ops & SelectionKey.OP_WRITE) != 0) in translateAndSetInterestOps() 1034 if ((ops & SelectionKey.OP_CONNECT) != 0) in translateAndSetInterestOps()
|
D | SourceChannelImpl.java | 132 ((intOps & SelectionKey.OP_READ) != 0)) in translateReadyOps() 133 newOps |= SelectionKey.OP_READ; in translateReadyOps() 148 if (ops == SelectionKey.OP_READ) in translateAndSetInterestOps()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/spi/ |
D | AbstractSelectableChannelTest.java | 24 import java.nio.channels.SelectionKey; 114 SelectionKey acceptKey = sc.register(acceptSelector1, in test_register_LSelectorILObject() 115 SelectionKey.OP_READ, null); in test_register_LSelectorILObject() 121 acceptKey = sc.register(acceptSelector2, SelectionKey.OP_READ, null); in test_register_LSelectorILObject() 147 msc.register(acceptSelector, SelectionKey.OP_READ, null); in test_register_LSelectorILObject_IllegalArgument() 161 msc.register(acceptSelector, SelectionKey.OP_READ, null); in test_register_LSelectorILObject_IllegalArgument() 183 msc.register(acceptSelector, SelectionKey.OP_READ, null); in test_register_LSelectorILObject_IllegalArgument() 197 msc.register(acceptSelector, SelectionKey.OP_READ, null); in test_register_LSelectorILObject_IllegalArgument() 214 sc.register(null, SelectionKey.OP_READ, argObj); in test_register_LSelectorILObject_IllegalArgument() 223 msc.register(acceptSelector, SelectionKey.OP_READ, null); in test_register_LSelectorILObject_IllegalArgument() [all …]
|
D | AbstractSelectorTest.java | 22 import java.nio.channels.SelectionKey; 120 SelectionKey acceptKey = ssc.register(acceptSelector, in test_register_LSelectorI() 121 SelectionKey.OP_ACCEPT); in test_register_LSelectorI() 138 ssc.register(acceptSelector, SelectionKey.OP_ACCEPT); in test_register_LSelectorI_error() 148 ssc.register(acceptSelector, SelectionKey.OP_ACCEPT); in test_register_LSelectorI_error() 155 SelectionKey acceptKey = ssc.register(acceptSelector, in test_register_LSelectorI_error() 156 SelectionKey.OP_ACCEPT); in test_register_LSelectorI_error()
|
D | MockAbstractSelector.java | 20 import java.nio.channels.SelectionKey; 48 protected SelectionKey register(AbstractSelectableChannel arg0, int arg1, in register() 65 public Set<SelectionKey> keys() { in keys() 69 public Set<SelectionKey> selectedKeys() { in selectedKeys()
|
D | AbstractSelectionKeyTest.java | 20 import java.nio.channels.SelectionKey; 68 public SelectionKey interestOps(int arg0) { in interestOps()
|
/libcore/ojluni/src/main/java/java/nio/channels/spi/ |
D | AbstractSelectableChannel.java | 61 private SelectionKey[] keys = null; 95 private void addKey(SelectionKey k) { in addKey() 104 keys = new SelectionKey[3]; in addKey() 108 SelectionKey[] ks = new SelectionKey[n]; in addKey() 118 private SelectionKey findKey(Selector sel) { in findKey() 129 void removeKey(SelectionKey k) { // package-private in removeKey() 161 public final SelectionKey keyFor(Selector sel) { in keyFor() 191 public final SelectionKey register(Selector sel, int ops, in register() 202 SelectionKey k = findKey(sel); in register() 238 SelectionKey k = keys[i]; in implCloseChannel()
|
D | AbstractSelector.java | 29 import java.nio.channels.SelectionKey; 88 private final Set<SelectionKey> cancelledKeys = new HashSet<SelectionKey>(); 90 void cancel(SelectionKey k) { // package-private in cancel() 152 protected final Set<SelectionKey> cancelledKeys() { in cancelledKeys() 175 protected abstract SelectionKey register(AbstractSelectableChannel ch, in register()
|
D | AbstractSelectionKey.java | 42 extends SelectionKey
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | SelectorTest.java | 25 import java.nio.channels.SelectionKey; 45 SelectionKey key = sc.register(selector, SelectionKey.OP_CONNECT); in testNonBlockingConnect_immediate() 47 assertEquals(SelectionKey.OP_CONNECT, key.readyOps()); in testNonBlockingConnect_immediate() 130 SelectionKey key = sc.register(selector, in test_57456() 131 SelectionKey.OP_CONNECT | SelectionKey.OP_READ | SelectionKey.OP_WRITE); in test_57456() 133 assertEquals(SelectionKey.OP_READ | SelectionKey.OP_WRITE, key.readyOps()); in test_57456() 166 sc.register(selector, SelectionKey.OP_READ | SelectionKey.OP_WRITE); in test28318596()
|
D | OldSocketChannelTest.java | 30 import java.nio.channels.SelectionKey; 175 assertEquals((SelectionKey.OP_CONNECT | SelectionKey.OP_READ | in testChannelBasicStatus() 176 SelectionKey.OP_WRITE), this.channel1.validOps()); in testChannelBasicStatus()
|
/libcore/ojluni/src/main/java/java/nio/channels/ |
D | SelectionKey.java | 110 public abstract class SelectionKey { class 115 protected SelectionKey() { } in SelectionKey() method in SelectionKey 199 public abstract SelectionKey interestOps(int ops); in interestOps() 368 private static final AtomicReferenceFieldUpdater<SelectionKey,Object> 370 SelectionKey.class, Object.class, "attachment"
|
D | SelectableChannel.java | 152 public abstract SelectionKey keyFor(Selector sel); in keyFor() 219 public abstract SelectionKey register(Selector sel, int ops, Object att) in register() 277 public final SelectionKey register(Selector sel, int ops) in register()
|
D | Pipe.java | 83 return SelectionKey.OP_READ; in validOps() 117 return SelectionKey.OP_WRITE; in validOps()
|
D | Selector.java | 259 public abstract Set<SelectionKey> keys(); in keys() 275 public abstract Set<SelectionKey> selectedKeys(); in selectedKeys()
|
D | SocketChannel.java | 214 return (SelectionKey.OP_READ in validOps() 215 | SelectionKey.OP_WRITE in validOps() 216 | SelectionKey.OP_CONNECT); in validOps()
|
D | DatagramChannel.java | 196 return (SelectionKey.OP_READ in validOps() 197 | SelectionKey.OP_WRITE); in validOps()
|
/libcore/ojluni/annotations/hiddenapi/sun/nio/ch/ |
D | SelectorImpl.java | 40 public java.util.Set<java.nio.channels.SelectionKey> keys() { in keys() 44 public java.util.Set<java.nio.channels.SelectionKey> selectedKeys() { in selectedKeys() 76 protected final java.nio.channels.SelectionKey register( in register() 93 protected java.util.HashSet<java.nio.channels.SelectionKey> keys; 95 private java.util.Set<java.nio.channels.SelectionKey> publicKeys; 98 private java.util.Set<java.nio.channels.SelectionKey> publicSelectedKeys; 101 protected java.util.Set<java.nio.channels.SelectionKey> selectedKeys;
|