src/java.base/linux/classes/sun/nio/ch/DefaultSelectorProvider.java
author erikj
Wed, 07 Mar 2018 13:26:15 -0800
changeset 49357 aaedb8343784
parent 47216 71c04702a3d5
permissions -rw-r--r--
8198243: Add build time check for global operator new/delete in object files Reviewed-by: tbell, kbarrett, dholmes, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34352
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
     1
/*
43617
88471465b9f0 8174039: (ch) DefaultAsynchronousChannelProvider should be split into platform specific versions
clanger
parents: 34352
diff changeset
     2
 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
34352
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
     4
 *
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    10
 *
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    15
 * accompanied this code).
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    16
 *
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    20
 *
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    23
 * questions.
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    24
 */
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    25
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    26
package sun.nio.ch;
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    27
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    28
import java.nio.channels.spi.SelectorProvider;
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    29
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    30
/**
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    31
 * Creates this platform's default SelectorProvider
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    32
 */
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    33
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    34
public class DefaultSelectorProvider {
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    35
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    36
    /**
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    37
     * Prevent instantiation.
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    38
     */
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    39
    private DefaultSelectorProvider() { }
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    40
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    41
    /**
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    42
     * Returns the default SelectorProvider.
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    43
     */
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    44
    public static SelectorProvider create() {
43617
88471465b9f0 8174039: (ch) DefaultAsynchronousChannelProvider should be split into platform specific versions
clanger
parents: 34352
diff changeset
    45
        return new EPollSelectorProvider();
34352
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    46
    }
f474afdf6017 8142872: Remove support for sun.nio.ch.PollSelectorProvider from 9
robm
parents:
diff changeset
    47
}