Package org.apache.tomcat.util.net
Class Acceptor<U>
java.lang.Object
org.apache.tomcat.util.net.Acceptor<U>
- All Implemented Interfaces:
- Runnable
- Direct Known Subclasses:
- Nio2Endpoint.Nio2Acceptor
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal Acceptor.AcceptorStategetState()protected inthandleExceptionWithDelay(int currentErrorDelay) Handles exceptions where a delay is required to prevent a Thread from entering a tight loop which will consume CPU and may also trigger large amounts of logging.voidrun()voidstop(int waitSeconds) Signals the Acceptor to stop, optionally waiting for that stop process to complete before returning.
- 
Field Details- 
state
 
- 
- 
Constructor Details- 
Acceptor
 
- 
- 
Method Details- 
getState
- 
runpublic void run()
- 
stoppublic void stop(int waitSeconds) Signals the Acceptor to stop, optionally waiting for that stop process to complete before returning. If a wait is requested and the stop does not complete in that time a warning will be logged.- Parameters:
- waitSeconds- The time to wait in seconds. Use a value less than zero for no wait.
 
- 
handleExceptionWithDelayprotected int handleExceptionWithDelay(int currentErrorDelay) Handles exceptions where a delay is required to prevent a Thread from entering a tight loop which will consume CPU and may also trigger large amounts of logging. For example, this can happen if the ulimit for open files is reached.- Parameters:
- currentErrorDelay- The current delay being applied on failure
- Returns:
- The delay to apply on the next failure
 
 
-