static void checkBlocking(Channel channel) { if (channel instanceof SelectableChannel && !((SelectableChannel) channel).isBlocking()) { throw new IllegalBlockingModeException(); } }
(SelectableChannel)scatteringByteChannel; if (!selectableChannel.isBlocking()) { throw new IllegalArgumentException( "Scattering byte channel is of type SelectableChannel " + (SelectableChannel)gatheringByteChannel; if (!selectableChannel.isBlocking()) { throw new IllegalArgumentException( "Gathering byte channel is of type SelectableChannel and " +
@Override public RegistrationReference registerChannel(Channel channel) { if (channel == null) { throw new NullPointerException("Channel is null"); } if (!(channel instanceof GatheringByteChannel)) { throw new IllegalArgumentException( "Channel is not of type GatheringByteChannel"); } if (!(channel instanceof ScatteringByteChannel)) { throw new IllegalArgumentException( "Channel is not of type ScatteringByteChannel"); } if (channel instanceof SelectableChannel) { SelectableChannel selectableChannel = (SelectableChannel)channel; if (!selectableChannel.isBlocking()) { throw new IllegalArgumentException( "Channel is of type SelectableChannel and configured in " + "nonblocking mode"); } } ensureOpen(); return doRegisterChannel( (ScatteringByteChannel)channel, (GatheringByteChannel)channel); }
public boolean isBlocking() { if (_channel instanceof SelectableChannel) return ((SelectableChannel)_channel).isBlocking(); return true; }
public boolean isBlocking() { if (_channel instanceof SelectableChannel) return ((SelectableChannel)_channel).isBlocking(); return true; }
public boolean isBlocking() { if (_channel instanceof SelectableChannel) return ((SelectableChannel)_channel).isBlocking(); return true; }
static void checkBlocking(Channel channel) { if (channel instanceof SelectableChannel && !((SelectableChannel) channel).isBlocking()) { throw new IllegalBlockingModeException(); } }
static void checkBlocking(Channel channel) { if (channel instanceof SelectableChannel && !((SelectableChannel) channel).isBlocking()) { throw new IllegalBlockingModeException(); } }
static void checkBlocking(Channel channel) { if (channel instanceof SelectableChannel && !((SelectableChannel) channel).isBlocking()) { throw new IllegalBlockingModeException(); } }
static void checkBlocking(Channel channel) { if (channel instanceof SelectableChannel && !((SelectableChannel) channel).isBlocking()) { throw new IllegalBlockingModeException(); } }
static void checkBlocking(Channel channel) { if (channel instanceof SelectableChannel && !((SelectableChannel) channel).isBlocking()) { throw new IllegalBlockingModeException(); } }
@Before("call(int java.nio.channels.DatagramChannel.send(java.nio.ByteBuffer,java.net.SocketAddress))") public void send(JoinPoint thisJoinPoint) { SelectableChannel asc = (SelectableChannel) thisJoinPoint.getTarget(); if (asc.isBlocking()) latency(HIGH, thisJoinPoint); } }
@Before("call(java.net.SocketAddress java.nio.channels.DatagramChannel.receive(java.nio.ByteBuffer))") public void receive(JoinPoint thisJoinPoint) { SelectableChannel asc = (SelectableChannel) thisJoinPoint.getTarget(); if (asc.isBlocking()) latency(HIGH, thisJoinPoint); }
@Before("call(int java.nio.channels.ReadableByteChannel+.read(java.nio.ByteBuffer))") public void read(JoinPoint thisJoinPoint) { if (thisJoinPoint.getTarget() instanceof SelectableChannel) { if (!((SelectableChannel) thisJoinPoint.getTarget()).isBlocking()) return; } latency(HIGH, thisJoinPoint); }
@Before("call(int java.nio.channels.WritableByteChannel+.write(java.nio.ByteBuffer))") public void write(JoinPoint thisJoinPoint) { if (thisJoinPoint.getTarget() instanceof SelectableChannel) { if (!((SelectableChannel) thisJoinPoint.getTarget()).isBlocking()) return; } latency(HIGH, thisJoinPoint); }
@Before("call(java.nio.channels.SocketChannel java.nio.channels.ServerSocketChannel.accept())") public void accept(JoinPoint thisJoinPoint) { if (config.isDebug()) { SelectableChannel asc = (SelectableChannel) thisJoinPoint.getTarget(); if (asc.isBlocking()) latency(HIGH, thisJoinPoint); } } }
private void saveReadBlocking(RubyIO ioObj, int i) { // save blocking state if (ioObj.getChannel() instanceof SelectableChannel) { getReadBlocking()[i] = ((SelectableChannel) ioObj.getChannel()).isBlocking(); } }
private void saveReadBlocking(RubyIO ioObj, int i) { // save blocking state if (ioObj.getChannel() instanceof SelectableChannel) { getReadBlocking()[i] = ((SelectableChannel) ioObj.getChannel()).isBlocking(); } }
private void saveReadBlocking(RubyIO ioObj, int i) { // save blocking state if (ioObj.getChannel() instanceof SelectableChannel) { getReadBlocking()[i] = ((SelectableChannel) ioObj.getChannel()).isBlocking(); } }
private void saveReadBlocking(RubyIO ioObj, int i) { // save blocking state if (ioObj.getChannel() instanceof SelectableChannel) { getReadBlocking()[i] = ((SelectableChannel) ioObj.getChannel()).isBlocking(); } }