| java.lang.Object sun.nio.ch.EPollArrayWrapper
EPollArrayWrapper | class EPollArrayWrapper (Code) | | Manipulates a native array of epoll_event structs on Linux:
typedef union epoll_data {
void *ptr;
int fd;
__uint32_t u32;
__uint64_t u64;
} epoll_data_t;
struct epoll_event {
__uint32_t events;
epoll_data_t data;
};
The system call to wait for I/O events is epoll_wait(2). It populates an
array of epoll_event structures that are passed to the call. The data
member of the epoll_event structure contains the same data as was set
when the file descriptor was registered to epoll via epoll_ctl(2). In
this implementation we set data.fd to be the file descriptor that we
register. That way, we have the file descriptor available when we
process the events.
All file descriptors registered with epoll have the POLLHUP and POLLERR
events enabled even when registered with an event set of 0. To ensure
that epoll_wait doesn't poll an idle file descriptor when the underlying
connection is closed or reset then its registration is deleted from
epoll (it will be re-added again if the event set is changed)
|
DATA_OFFSET | final static short DATA_OFFSET(Code) | | |
EPOLLIN | final static int EPOLLIN(Code) | | |
EPOLL_CTL_ADD | final static int EPOLL_CTL_ADD(Code) | | |
EPOLL_CTL_DEL | final static int EPOLL_CTL_DEL(Code) | | |
EPOLL_CTL_MOD | final static int EPOLL_CTL_MOD(Code) | | |
EVENT_OFFSET | final static short EVENT_OFFSET(Code) | | |
FD_OFFSET | final static short FD_OFFSET(Code) | | |
NUM_EPOLLEVENTS | final static int NUM_EPOLLEVENTS(Code) | | |
SIZE_EPOLLEVENT | final static short SIZE_EPOLLEVENT(Code) | | |
incomingInterruptFD | int incomingInterruptFD(Code) | | |
interrupted | boolean interrupted(Code) | | |
interruptedIndex | int interruptedIndex(Code) | | |
outgoingInterruptFD | int outgoingInterruptFD(Code) | | |
EPollArrayWrapper | EPollArrayWrapper()(Code) | | |
add | void add(int fd)(Code) | | Add a new file descriptor to epoll
|
clearInterrupted | void clearInterrupted()(Code) | | |
closeEPollFD | void closeEPollFD() throws IOException(Code) | | Close epoll file descriptor and free poll array
|
getDescriptor | int getDescriptor(int i)(Code) | | |
getEventOps | int getEventOps(int i)(Code) | | |
initInterrupt | void initInterrupt(int fd0, int fd1)(Code) | | |
interrupt | public void interrupt()(Code) | | |
interrupted | boolean interrupted()(Code) | | |
interruptedIndex | public int interruptedIndex()(Code) | | |
putData | void putData(int i, long value)(Code) | | |
putDescriptor | void putDescriptor(int i, int fd)(Code) | | |
putEventOps | void putEventOps(int i, int event)(Code) | | |
release | void release(int fd)(Code) | | Remove a file descriptor from epoll
|
setInterest | void setInterest(int fd, int mask)(Code) | | Update the events for a given file descriptor.
|
updateRegistrations | void updateRegistrations()(Code) | | Update the pending registrations.
|
|
|