|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.io.nio.SelectorManager
public abstract class SelectorManager
The Selector Manager manages and number of SelectSets to allow NIO scheduling to scale to large numbers of connections.
| 嵌套类摘要 | |
|---|---|
class |
SelectorManager.SelectSet
|
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的嵌套类/接口 |
|---|
AbstractLifeCycle.AbstractLifeCycleListener |
| 从接口 org.eclipse.jetty.util.component.LifeCycle 继承的嵌套类/接口 |
|---|
LifeCycle.Listener |
| 字段摘要 | |
|---|---|
static Logger |
LOG
|
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的字段 |
|---|
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING |
| 构造方法摘要 | |
|---|---|
SelectorManager()
|
|
| 方法摘要 | |
|---|---|
protected void |
connectionFailed(SocketChannel channel,
Throwable ex,
Object attachment)
|
abstract boolean |
dispatch(Runnable task)
|
protected void |
doStart()
|
protected void |
doStop()
|
String |
dump()
|
void |
dump(Appendable out,
String indent)
|
protected abstract void |
endPointClosed(SelectChannelEndPoint endpoint)
|
protected abstract void |
endPointOpened(SelectChannelEndPoint endpoint)
|
protected abstract void |
endPointUpgraded(ConnectedEndPoint endpoint,
Connection oldConnection)
|
long |
getLowResourcesConnections()
|
long |
getLowResourcesMaxIdleTime()
|
long |
getMaxIdleTime()
|
int |
getSelectorPriorityDelta()
|
SelectorManager.SelectSet |
getSelectSet(int i)
|
int |
getSelectSets()
|
boolean |
isDeferringInterestedOps0()
|
abstract AsyncConnection |
newConnection(SocketChannel channel,
AsyncEndPoint endpoint,
Object attachment)
|
protected abstract SelectChannelEndPoint |
newEndPoint(SocketChannel channel,
SelectorManager.SelectSet selectSet,
SelectionKey sKey)
Create a new end point |
void |
register(ServerSocketChannel acceptChannel)
Register a ServerSocketChannel |
void |
register(SocketChannel channel)
Register a channel |
void |
register(SocketChannel channel,
Object att)
Register a channel |
void |
setDeferringInterestedOps0(boolean deferringInterestedOps0)
|
void |
setLowResourcesConnections(long lowResourcesConnections)
Set the number of connections, which if exceeded places this manager in low resources state. |
void |
setLowResourcesMaxIdleTime(long lowResourcesMaxIdleTime)
|
void |
setMaxIdleTime(long maxIdleTime)
|
void |
setSelectorPriorityDelta(int delta)
Set the selector thread priorty delta. |
void |
setSelectSets(int selectSets)
|
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的方法 |
|---|
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public static final Logger LOG
| 构造方法详细信息 |
|---|
public SelectorManager()
| 方法详细信息 |
|---|
public void setMaxIdleTime(long maxIdleTime)
maxIdleTime - The maximum period in milli seconds that a connection may be idle before it is closed.setLowResourcesMaxIdleTime(long)public void setSelectSets(int selectSets)
selectSets - number of select sets to createpublic long getMaxIdleTime()
public int getSelectSets()
public SelectorManager.SelectSet getSelectSet(int i)
i -
public void register(SocketChannel channel,
Object att)
channel - att - Attached Objectpublic void register(SocketChannel channel)
channel - public void register(ServerSocketChannel acceptChannel)
ServerSocketChannel
acceptChannel - public int getSelectorPriorityDelta()
public void setSelectorPriorityDelta(int delta)
delta - The value to add to the selector thread priority.public long getLowResourcesConnections()
public void setLowResourcesConnections(long lowResourcesConnections)
lowResourcesConnections - the number of connectionssetLowResourcesMaxIdleTime(long)public long getLowResourcesMaxIdleTime()
public void setLowResourcesMaxIdleTime(long lowResourcesMaxIdleTime)
lowResourcesMaxIdleTime - the period in ms that a connection is allowed to be idle when this SelectSet has more connections than getLowResourcesConnections()setMaxIdleTime(long)public abstract boolean dispatch(Runnable task)
protected void doStart()
throws Exception
AbstractLifeCycle 中的 doStartException
protected void doStop()
throws Exception
AbstractLifeCycle 中的 doStopExceptionprotected abstract void endPointClosed(SelectChannelEndPoint endpoint)
endpoint - protected abstract void endPointOpened(SelectChannelEndPoint endpoint)
endpoint -
protected abstract void endPointUpgraded(ConnectedEndPoint endpoint,
Connection oldConnection)
public abstract AsyncConnection newConnection(SocketChannel channel,
AsyncEndPoint endpoint,
Object attachment)
protected abstract SelectChannelEndPoint newEndPoint(SocketChannel channel,
SelectorManager.SelectSet selectSet,
SelectionKey sKey)
throws IOException
channel - selectSet - sKey - the selection key
SelectChannelEndPoint
IOException
protected void connectionFailed(SocketChannel channel,
Throwable ex,
Object attachment)
public String dump()
Dumpable 中的 dump
public void dump(Appendable out,
String indent)
throws IOException
Dumpable 中的 dumpIOExceptionpublic boolean isDeferringInterestedOps0()
public void setDeferringInterestedOps0(boolean deferringInterestedOps0)
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||