2362N/A * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * An abstract selector impl. 0N/A // The poll fd array 0N/A // Initial capacity of the pollfd array 0N/A // The list of SelectableChannels serviced by this Selector 0N/A // In some impls the first entry of channelArray is bogus 0N/A // The number of valid channels in this Selector's poll array 0N/A // True if this Selector has been closed 673N/A // Lock for close and cleanup 0N/A // Deregister channels 0N/A * Copy the information in the pollfd structs into the opss 0N/A * of the corresponding Channels. Add the ready keys to the 0N/A // Skip zeroth entry; it is for interrupts only 673N/A // Check to see if the array is large enough 673N/A // Grow the NativeObject poll array 0N/A // Algorithm: Copy the sc from the end of the list and put it into 0N/A // the location of the sc to be removed (since order doesn't 0N/A // matter). Decrement the sc count. Update the index of the sc 0N/A // Copy end one over it 0N/A // Destroy the last one 0N/A // Remove the key from keys and selectedKeys