< prev index next >

src/jdk.net/linux/classes/jdk/internal/net/rdma/RdmaPollSelectorImpl.java

Print this page

        

*** 33,44 **** * Selector implementation based on poll */ public class RdmaPollSelectorImpl extends PollSelectorImpl { protected RdmaPollSelectorImpl(SelectorProvider sp) throws IOException { ! super(sp); } protected int poll(long pollAddress, int numfds, int timeout) { return poll0(pollAddress, numfds, timeout); } --- 33,53 ---- * Selector implementation based on poll */ public class RdmaPollSelectorImpl extends PollSelectorImpl { + private static final UnsupportedOperationException unsupported; + + private static final SelectorProvider checkSupported(SelectorProvider sp) { + if (unsupported != null) + throw new UnsupportedOperationException(unsupported.getMessage(), unsupported); + else + return sp; + } + protected RdmaPollSelectorImpl(SelectorProvider sp) throws IOException { ! super(checkSupported(sp)); } protected int poll(long pollAddress, int numfds, int timeout) { return poll0(pollAddress, numfds, timeout); }
*** 52,61 **** System.loadLibrary("extnet"); return null; } }); IOUtil.load(); init(); } ! private static native void init(); } --- 61,76 ---- System.loadLibrary("extnet"); return null; } }); IOUtil.load(); + UnsupportedOperationException uoe = null; + try { init(); + } catch (UnsupportedOperationException e) { + uoe = e; + } + unsupported = uoe; } ! private static native void init() throws UnsupportedOperationException; }
< prev index next >