org.apache.http.impl.nio.reactor

## Class IOReactorConfig

- java.lang.Object
- - org.apache.http.impl.nio.reactor.IOReactorConfig

All Implemented Interfaces:
  Cloneable

    @NotThreadSafe
    public final class IOReactorConfig
    extends Object
    implements Cloneable

I/O reactor configuration parameters.

Since:
  4.2

### Nested Class Summary

Nested Classes
`static class` `IOReactorConfig.Builder`

### Field Summary

Fields
`static IOReactorConfig` `DEFAULT`

### Constructor Summary

Constructors
Constructor and Description
`IOReactorConfig()` Deprecated.

### Method Summary

Methods
`protected IOReactorConfig` `clone()`
`static IOReactorConfig.Builder` `copy(IOReactorConfig config)`
`static IOReactorConfig.Builder` `custom()`
`int` `getConnectTimeout()` Determines the default connect timeout value for non-blocking connection requests.
`int` `getIoThreadCount()` Determines the number of I/O dispatch threads to be used by the I/O reactor.
`int` `getRcvBufSize()` Determines the default value of the `SocketOptions.SO_RCVBUF` parameter for newly created sockets.
`long` `getSelectInterval()` Determines time interval in milliseconds at which the I/O reactor wakes up to check for timed out sessions and session requests.
`long` `getShutdownGracePeriod()` Determines grace period in milliseconds the I/O reactors are expected to block waiting for individual worker threads to terminate cleanly.
`int` `getSndBufSize()` Determines the default value of the `SocketOptions.SO_SNDBUF` parameter for newly created sockets.
`int` `getSoLinger()` Determines the default value of the `SocketOptions.SO_LINGER` parameter for newly created sockets.
`int` `getSoTimeout()` Determines the default socket timeout value for non-blocking I/O operations.
`boolean` `isInterestOpQueued()` Determines whether or not I/O interest operations are to be queued and executed asynchronously by the I/O reactor thread or to be applied to the underlying `SelectionKey` immediately.
`boolean` `isSoKeepalive()` Determines the default value of the `SocketOptions.SO_KEEPALIVE` parameter for newly created sockets.
`boolean` `isSoReuseAddress()` Determines the default value of the `SocketOptions.SO_REUSEADDR` parameter for newly created sockets.
`boolean` `isTcpNoDelay()` Determines the default value of the `SocketOptions.TCP_NODELAY` parameter for newly created sockets.
`void` `setConnectTimeout(int connectTimeout)` Deprecated. (4.3) use `IOReactorConfig.Builder.setConnectTimeout(int)`
`void` `setInterestOpQueued(boolean interestOpQueued)` Deprecated. (4.3) use `IOReactorConfig.Builder.setInterestOpQueued(boolean)`
`void` `setIoThreadCount(int ioThreadCount)` Deprecated. (4.3) use `IOReactorConfig.Builder.setIoThreadCount(int)`
`void` `setRcvBufSize(int rcvBufSize)` Deprecated. (4.3) use `IOReactorConfig.Builder.setRcvBufSize(int)`
`void` `setSelectInterval(long selectInterval)` Deprecated. (4.3) use `IOReactorConfig.Builder.setSelectInterval(long)`
`void` `setShutdownGracePeriod(long gracePeriod)` Deprecated. (4.3) use `IOReactorConfig.Builder.setShutdownGracePeriod(long)`
`void` `setSndBufSize(int sndBufSize)` Deprecated. (4.3) use `IOReactorConfig.Builder.setSndBufSize(int)`
`void` `setSoKeepalive(boolean soKeepAlive)` Deprecated. (4.3) use `IOReactorConfig.Builder.setSoKeepAlive(boolean)`
`void` `setSoLinger(int soLinger)` Deprecated. (4.3) use `IOReactorConfig.Builder.setSoLinger(int)`
`void` `setSoReuseAddress(boolean soReuseAddress)` Deprecated. (4.3) use `IOReactorConfig.Builder.setSoReuseAddress(boolean)`
`void` `setSoTimeout(int soTimeout)` Deprecated. (4.3) use `IOReactorConfig.Builder.setSoTimeout(int)`
`void` `setTcpNoDelay(boolean tcpNoDelay)` Deprecated. (4.3) use `IOReactorConfig.Builder.setTcpNoDelay(boolean)`
`String` `toString()`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### DEFAULT

    public static final IOReactorConfig DEFAULT

### Constructor Detail

#### IOReactorConfig

    @Deprecated
    public IOReactorConfig()

Deprecated.

### Method Detail

#### getSelectInterval

    public long getSelectInterval()

Determines time interval in milliseconds at which the I/O reactor wakes up to check for timed out sessions and session requests.

Default: `1000` milliseconds.

#### setSelectInterval

    @Deprecated
    public void setSelectInterval(long selectInterval)

Deprecated. (4.3) use `IOReactorConfig.Builder.setSelectInterval(long)`

#### getShutdownGracePeriod

    public long getShutdownGracePeriod()

Determines grace period in milliseconds the I/O reactors are expected to block waiting for individual worker threads to terminate cleanly.

Default: `500` milliseconds.

#### setShutdownGracePeriod

    @Deprecated
    public void setShutdownGracePeriod(long gracePeriod)

Deprecated. (4.3) use `IOReactorConfig.Builder.setShutdownGracePeriod(long)`

#### isInterestOpQueued

    public boolean isInterestOpQueued()

Determines whether or not I/O interest operations are to be queued and executed asynchronously by the I/O reactor thread or to be applied to the underlying `SelectionKey` immediately.

Default: `false`

See Also:
  `SelectionKey`, `SelectionKey.interestOps()`, `SelectionKey.interestOps(int)`

#### setInterestOpQueued

    @Deprecated
    public void setInterestOpQueued(boolean interestOpQueued)

Deprecated. (4.3) use `IOReactorConfig.Builder.setInterestOpQueued(boolean)`

#### getIoThreadCount

    public int getIoThreadCount()

Determines the number of I/O dispatch threads to be used by the I/O reactor.

Default: `2`

#### setIoThreadCount

    @Deprecated
    public void setIoThreadCount(int ioThreadCount)

Deprecated. (4.3) use `IOReactorConfig.Builder.setIoThreadCount(int)`

#### getSoTimeout

    public int getSoTimeout()

Determines the default socket timeout value for non-blocking I/O operations.

Default: `0` (no timeout)

See Also:
  `SocketOptions.SO_TIMEOUT`

#### setSoTimeout

    @Deprecated
    public void setSoTimeout(int soTimeout)

Deprecated. (4.3) use `IOReactorConfig.Builder.setSoTimeout(int)`

#### isSoReuseAddress

    public boolean isSoReuseAddress()

Determines the default value of the `SocketOptions.SO_REUSEADDR` parameter for newly created sockets.

Default: `false`

See Also:
  `SocketOptions.SO_REUSEADDR`

#### setSoReuseAddress

    @Deprecated
    public void setSoReuseAddress(boolean soReuseAddress)

Deprecated. (4.3) use `IOReactorConfig.Builder.setSoReuseAddress(boolean)`

#### getSoLinger

    public int getSoLinger()

Determines the default value of the `SocketOptions.SO_LINGER` parameter for newly created sockets.

Default: `-1`

See Also:
  `SocketOptions.SO_LINGER`

#### setSoLinger

    @Deprecated
    public void setSoLinger(int soLinger)

Deprecated. (4.3) use `IOReactorConfig.Builder.setSoLinger(int)`

#### isSoKeepalive

    public boolean isSoKeepalive()

Determines the default value of the `SocketOptions.SO_KEEPALIVE` parameter for newly created sockets.

Default: `-1`

See Also:
  `SocketOptions.SO_KEEPALIVE`

#### setSoKeepalive

    @Deprecated
    public void setSoKeepalive(boolean soKeepAlive)

Deprecated. (4.3) use `IOReactorConfig.Builder.setSoKeepAlive(boolean)`

#### isTcpNoDelay

    public boolean isTcpNoDelay()

Determines the default value of the `SocketOptions.TCP_NODELAY` parameter for newly created sockets.

Default: `false`

See Also:
  `SocketOptions.TCP_NODELAY`

#### setTcpNoDelay

    @Deprecated
    public void setTcpNoDelay(boolean tcpNoDelay)

Deprecated. (4.3) use `IOReactorConfig.Builder.setTcpNoDelay(boolean)`

#### getConnectTimeout

    public int getConnectTimeout()

Determines the default connect timeout value for non-blocking connection requests.

Default: `0` (no timeout)

#### setConnectTimeout

    @Deprecated
    public void setConnectTimeout(int connectTimeout)

Deprecated. (4.3) use `IOReactorConfig.Builder.setConnectTimeout(int)`

#### getSndBufSize

    public int getSndBufSize()

Determines the default value of the `SocketOptions.SO_SNDBUF` parameter for newly created sockets.

Default: `0` (system default)

See Also:
  `SocketOptions.SO_SNDBUF`

#### setSndBufSize

    @Deprecated
    public void setSndBufSize(int sndBufSize)

Deprecated. (4.3) use `IOReactorConfig.Builder.setSndBufSize(int)`

#### getRcvBufSize

    public int getRcvBufSize()

Determines the default value of the `SocketOptions.SO_RCVBUF` parameter for newly created sockets.

Default: `0` (system default)

See Also:
  `SocketOptions.SO_RCVBUF`

#### setRcvBufSize

    @Deprecated
    public void setRcvBufSize(int rcvBufSize)

Deprecated. (4.3) use `IOReactorConfig.Builder.setRcvBufSize(int)`

#### clone

    protected IOReactorConfig clone()
                             throws CloneNotSupportedException

Overrides:
  `clone` in class `Object`
Throws:
  `CloneNotSupportedException`

#### custom

    public static IOReactorConfig.Builder custom()

#### copy

    public static IOReactorConfig.Builder copy(IOReactorConfig config)

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`