public class AprEndpoint.Poller extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
protected AprEndpoint.SocketList |
addList
List of sockets to be added to the poller.
|
protected long[] |
desc
Socket descriptors.
|
protected long |
lastMaintain
Last run of maintain.
|
protected long |
pool
Root pool.
|
protected AprEndpoint.SocketTimeouts |
timeouts
Structure used for storing timeouts.
|
Constructor and Description |
---|
AprEndpoint.Poller() |
Modifier and Type | Method and Description |
---|---|
void |
add(long socket,
int timeout,
boolean read,
boolean write)
Add specified socket and associated pool to the poller.
|
protected boolean |
addToPoller(long socket,
int events)
Add specified socket to one of the pollers.
|
protected boolean |
close(long socket) |
protected void |
destroy()
Destroy the poller.
|
int |
getConnectionCount() |
protected void |
init()
Create the poller.
|
protected void |
maintain()
Timeout checks.
|
void |
run()
The background thread that adds sockets to the Poller, checks the
poller for triggered events and hands the associated socket off to an
appropriate processor as events occur.
|
protected void |
stop() |
String |
toString()
Displays the list of sockets in the pollers.
|
protected long pool
protected long[] desc
protected AprEndpoint.SocketList addList
protected AprEndpoint.SocketTimeouts timeouts
protected long lastMaintain
public int getConnectionCount()
protected void init()
protected void stop()
protected void destroy()
public void add(long socket, int timeout, boolean read, boolean write)
socket
- to add to the pollertimeout
- to use for this connectionread
- to do read pollingwrite
- to do write pollingprotected boolean addToPoller(long socket, int events)
run()
.protected boolean close(long socket)
protected void maintain()
public String toString()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.