public abstract class AbstractIoSessionConfig extends Object implements IoSessionConfig
IoSessionConfig.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractIoSessionConfig() |
| Modifier and Type | Method and Description |
|---|---|
int |
getBothIdleTime() |
long |
getBothIdleTimeInMillis() |
int |
getIdleTime(IdleStatus status) |
long |
getIdleTimeInMillis(IdleStatus status) |
int |
getMaxReadBufferSize() |
int |
getMinReadBufferSize() |
int |
getReadBufferSize() |
int |
getReaderIdleTime() |
long |
getReaderIdleTimeInMillis() |
int |
getThroughputCalculationInterval() |
long |
getThroughputCalculationIntervalInMillis() |
int |
getWriterIdleTime() |
long |
getWriterIdleTimeInMillis() |
int |
getWriteTimeout() |
long |
getWriteTimeoutInMillis() |
boolean |
isUseReadOperation() |
void |
setAll(IoSessionConfig config)
Sets all configuration properties retrieved from the specified
config. |
void |
setBothIdleTime(int idleTime)
Sets idle time for
IdleStatus.WRITER_IDLE in seconds. |
void |
setIdleTime(IdleStatus status,
int idleTime)
Sets idle time for the specified type of idleness in seconds.
|
void |
setMaxReadBufferSize(int maxReadBufferSize)
Sets the maximum size of the read buffer that I/O processor
allocates per each read.
|
void |
setMinReadBufferSize(int minReadBufferSize)
Sets the minimum size of the read buffer that I/O processor
allocates per each read.
|
void |
setReadBufferSize(int readBufferSize)
Sets the size of the read buffer that I/O processor allocates
per each read.
|
void |
setReaderIdleTime(int idleTime)
Sets idle time for
IdleStatus.READER_IDLE in seconds. |
void |
setThroughputCalculationInterval(int throughputCalculationInterval)
Sets the interval (seconds) between each throughput calculation.
|
void |
setUseReadOperation(boolean useReadOperation)
Enables or disabled
IoSession.read() operation. |
void |
setWriterIdleTime(int idleTime)
Sets idle time for
IdleStatus.WRITER_IDLE in seconds. |
void |
setWriteTimeout(int writeTimeout)
Sets write timeout in seconds.
|
public void setAll(IoSessionConfig config)
config.setAll in interface IoSessionConfigconfig - The configuration to usepublic int getReadBufferSize()
getReadBufferSize in interface IoSessionConfigpublic void setReadBufferSize(int readBufferSize)
setReadBufferSize in interface IoSessionConfigreadBufferSize - The size of the read bufferpublic int getMinReadBufferSize()
getMinReadBufferSize in interface IoSessionConfigpublic void setMinReadBufferSize(int minReadBufferSize)
setMinReadBufferSize in interface IoSessionConfigminReadBufferSize - The minimum size of the read bufferpublic int getMaxReadBufferSize()
getMaxReadBufferSize in interface IoSessionConfigpublic void setMaxReadBufferSize(int maxReadBufferSize)
setMaxReadBufferSize in interface IoSessionConfigmaxReadBufferSize - The maximum size of the read bufferpublic int getIdleTime(IdleStatus status)
getIdleTime in interface IoSessionConfigstatus - The status for which we want the idle time (One of READER_IDLE,
WRITER_IDLE or BOTH_IDLE)public long getIdleTimeInMillis(IdleStatus status)
getIdleTimeInMillis in interface IoSessionConfigstatus - The status for which we want the idle time (One of READER_IDLE,
WRITER_IDLE or BOTH_IDLE)public void setIdleTime(IdleStatus status, int idleTime)
setIdleTime in interface IoSessionConfigstatus - The status for which we want to set the idle time (One of READER_IDLE,
WRITER_IDLE or BOTH_IDLE)idleTime - The time in second to setpublic final int getBothIdleTime()
getBothIdleTime in interface IoSessionConfigIdleStatus.BOTH_IDLE in seconds.public final long getBothIdleTimeInMillis()
getBothIdleTimeInMillis in interface IoSessionConfigIdleStatus.BOTH_IDLE in milliseconds.public final int getReaderIdleTime()
getReaderIdleTime in interface IoSessionConfigIdleStatus.READER_IDLE in seconds.public final long getReaderIdleTimeInMillis()
getReaderIdleTimeInMillis in interface IoSessionConfigIdleStatus.READER_IDLE in milliseconds.public final int getWriterIdleTime()
getWriterIdleTime in interface IoSessionConfigIdleStatus.WRITER_IDLE in seconds.public final long getWriterIdleTimeInMillis()
getWriterIdleTimeInMillis in interface IoSessionConfigIdleStatus.WRITER_IDLE in milliseconds.public void setBothIdleTime(int idleTime)
IdleStatus.WRITER_IDLE in seconds.setBothIdleTime in interface IoSessionConfigidleTime - The time to setpublic void setReaderIdleTime(int idleTime)
IdleStatus.READER_IDLE in seconds.setReaderIdleTime in interface IoSessionConfigidleTime - The time to setpublic void setWriterIdleTime(int idleTime)
IdleStatus.WRITER_IDLE in seconds.setWriterIdleTime in interface IoSessionConfigidleTime - The time to setpublic int getWriteTimeout()
getWriteTimeout in interface IoSessionConfigpublic long getWriteTimeoutInMillis()
getWriteTimeoutInMillis in interface IoSessionConfigpublic void setWriteTimeout(int writeTimeout)
setWriteTimeout in interface IoSessionConfigwriteTimeout - The timeout to setpublic boolean isUseReadOperation()
isUseReadOperation in interface IoSessionConfigtrue if and only if IoSession.read() operation
is enabled. If enabled, all received messages are stored in an internal
BlockingQueue so you can read received messages in more
convenient way for client applications. Enabling this option is not
useful to server applications and can cause unintended memory leak, and
therefore it's disabled by default.public void setUseReadOperation(boolean useReadOperation)
IoSession.read() operation. If enabled, all
received messages are stored in an internal BlockingQueue so you
can read received messages in more convenient way for client
applications. Enabling this option is not useful to server applications
and can cause unintended memory leak, and therefore it's disabled by
default.setUseReadOperation in interface IoSessionConfiguseReadOperation - true if the read operation is enabled, false otherwisepublic int getThroughputCalculationInterval()
getThroughputCalculationInterval in interface IoSessionConfig3 seconds.public void setThroughputCalculationInterval(int throughputCalculationInterval)
3 seconds.setThroughputCalculationInterval in interface IoSessionConfigthroughputCalculationInterval - The intervalpublic long getThroughputCalculationIntervalInMillis()
getThroughputCalculationIntervalInMillis in interface IoSessionConfig3 seconds.Copyright © 2004–2024 Apache MINA Project. All rights reserved.