private void closeAll() { try { Native.epollWait(epollFd, events, 0); } catch (IOException ignore) { // ignore on close } Collection<AbstractEpollChannel> array = new ArrayList<AbstractEpollChannel>(channels.size()); for (IntObjectMap.Entry<AbstractEpollChannel> entry: channels.entries()) { array.add(entry.value()); } for (AbstractEpollChannel ch: array) { ch.unsafe().close(ch.unsafe().voidPromise()); } }
@Override public Collection<V> values() { return Lists.newArrayList(Iterables.transform(secondary.entries(), new Function<IntObjectMap.Entry<V>, V>() { @Override public V apply(IntObjectMap.Entry<V> entry) { return Preconditions.checkNotNull(entry).value(); } })); }