Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/sun/nio/ch/SelChImpl.java
38918 views
/*1* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package sun.nio.ch;2627import java.nio.channels.Channel;28import java.io.FileDescriptor;29import java.io.IOException;303132/**33* An interface that allows translation (and more!).34*35* @since 1.436*/3738public interface SelChImpl extends Channel {3940FileDescriptor getFD();4142int getFDVal();4344/**45* Adds the specified ops if present in interestOps. The specified46* ops are turned on without affecting the other ops.47*48* @return true iff the new value of sk.readyOps() set by this method49* contains at least one bit that the previous value did not50* contain51*/52public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk);5354/**55* Sets the specified ops if present in interestOps. The specified56* ops are turned on, and all other ops are turned off.57*58* @return true iff the new value of sk.readyOps() set by this method59* contains at least one bit that the previous value did not60* contain61*/62public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk);6364void translateAndSetInterestOps(int ops, SelectionKeyImpl sk);6566int validOps();6768void kill() throws IOException;6970}717273