IOEventAccess.java 909 字节
Newer Older
Y
yunyao.zxl 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
package sun.nio.ch;

import sun.misc.Unsafe;

import java.io.IOException;

public interface IOEventAccess {

    int eventCtlAdd();

    int eventCtlDel();

    int eventCtlMod();

    int eventOneShot();

    int noEvent();

    long allocatePollArray(int count);

    void freePollArray(long address);

    long getEvent(long address, int i);

    int getDescriptor(long eventAddress);

    int getEvents(long eventAddress);

    int eventCreate() throws IOException;

    int eventCtl(int epfd, int opcode, int fd, int events);

    int eventWait(int epfd, long pollAddress, int numfds, int timeout) throws IOException;

    void socketpair(int[] sv) throws IOException;

    void interrupt(int fd) throws IOException;

    void drain(int fd) throws IOException;

    void close(int fd);

    static void initializeEvent() {
        Unsafe.getUnsafe().ensureClassInitialized(IOEvent.eventClass());
    }

}