equal
deleted
inserted
replaced
639 public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk) { |
639 public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk) { |
640 return translateReadyOps(ops, 0, sk); |
640 return translateReadyOps(ops, 0, sk); |
641 } |
641 } |
642 |
642 |
643 @Override |
643 @Override |
644 public void translateAndSetInterestOps(int ops, SelectionKeyImpl sk) { |
644 public int translateInterestOps(int ops) { |
645 int newOps = 0; |
645 int newOps = 0; |
646 if ((ops & SelectionKey.OP_READ) != 0) |
646 if ((ops & SelectionKey.OP_READ) != 0) |
647 newOps |= Net.POLLIN; |
647 newOps |= Net.POLLIN; |
648 if ((ops & SelectionKey.OP_WRITE) != 0) |
648 if ((ops & SelectionKey.OP_WRITE) != 0) |
649 newOps |= Net.POLLOUT; |
649 newOps |= Net.POLLOUT; |
650 if ((ops & SelectionKey.OP_CONNECT) != 0) |
650 if ((ops & SelectionKey.OP_CONNECT) != 0) |
651 newOps |= Net.POLLCONN; |
651 newOps |= Net.POLLCONN; |
652 sk.selector.putEventOps(sk, newOps); |
652 return newOps; |
653 } |
653 } |
654 |
654 |
655 @Override |
655 @Override |
656 public void kill() throws IOException { |
656 public void kill() throws IOException { |
657 synchronized (stateLock) { |
657 synchronized (stateLock) { |