Package com.gigaspaces.config.lrmi.nio
Class NIOConfiguration
java.lang.Object
com.gigaspaces.config.lrmi.nio.NIOConfiguration
- All Implemented Interfaces:
ITransportConfig,SmartExternalizable,Externalizable,Serializable,Cloneable
public class NIOConfiguration
extends Object
implements ITransportConfig, Cloneable, SmartExternalizable
This class provides configuration object of NIO communication transport protocol.
- Since:
- 5.2
- Author:
- Igor Goldenberg
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static NIOConfigurationcreate()Creates a new instance of NIO configuration based on system properties.intintintintlongintintintfinal StringintintintintintlongintintintlonglongintlonglonglongbooleanbooleanvoidvoidsetBindHost(String bindHostName) voidsetBindPort(String bindPort) voidsetBlockingConnection(boolean blockingConnection) voidsetMaxConnPool(int maxConnPool) voidsetMaxThreads(int maxThreads) voidsetMinThreads(int minThreads) voidsetSlowConsumerLatency(int slowConsumerLatency) voidsetSlowConsumerReadTimeout(int slowConsumerReadTimeout) voidsetSlowConsumerRetries(int slowConsumerRetries) voidsetSlowConsumerThroughput(int slowConsumerThroughput) voidsetThreadsQueueSize(int threadsQueueSize) toString()voidMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.gigaspaces.serialization.SmartExternalizable
enabledSmartExternalizableWithReference
-
Field Details
-
PROTOCOL_NAME
- See Also:
-
BIND_PORT_SYS_PROP
- See Also:
-
BIND_PORT_ENV_VAR
- See Also:
-
-
Constructor Details
-
NIOConfiguration
public NIOConfiguration()Should not be used, only for externalizable.
-
-
Method Details
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
create
Creates a new instance of NIO configuration based on system properties. -
clone
- Specified by:
clonein interfaceITransportConfig- Overrides:
clonein classObject
-
getProtocolAdaptorClass
- Specified by:
getProtocolAdaptorClassin interfaceITransportConfig- Returns:
- the protocol adaptor classname
-
getMinThreads
public int getMinThreads()- Specified by:
getMinThreadsin interfaceITransportConfig- Returns:
- The minimal number of transport threads
-
setMinThreads
public void setMinThreads(int minThreads) -
getMaxThreads
public int getMaxThreads()- Specified by:
getMaxThreadsin interfaceITransportConfig- Returns:
- The maximal number of transport threads
-
setMaxThreads
public void setMaxThreads(int maxThreads) -
getThreadsQueueSize
public int getThreadsQueueSize()- Specified by:
getThreadsQueueSizein interfaceITransportConfig- Returns:
- The threads queue size
-
setThreadsQueueSize
public void setThreadsQueueSize(int threadsQueueSize) -
getConnectionPoolSize
public int getConnectionPoolSize()- Specified by:
getConnectionPoolSizein interfaceITransportConfig- Returns:
- the connection socket pool size of protocol adaptor
-
setMaxConnPool
public void setMaxConnPool(int maxConnPool) -
setBindHost
-
setBindPort
-
setBlockingConnection
public void setBlockingConnection(boolean blockingConnection) -
getMaxConnPool
public int getMaxConnPool() -
getBindPort
-
getBindHostName
-
getProtocolName
- Specified by:
getProtocolNamein interfaceITransportConfig- Returns:
- the protocol adaptor name of underlying transport protocol
-
isBlockingConnection
public boolean isBlockingConnection()- Specified by:
isBlockingConnectionin interfaceITransportConfig- Returns:
- is blocking connection
-
getSlowConsumerLatency
public int getSlowConsumerLatency()- Specified by:
getSlowConsumerLatencyin interfaceITransportConfig- Returns:
- Slow Consumer Latency
-
setSlowConsumerLatency
public void setSlowConsumerLatency(int slowConsumerLatency) -
getSlowConsumerRetries
public int getSlowConsumerRetries()- Specified by:
getSlowConsumerRetriesin interfaceITransportConfig- Returns:
- Slow Consumer Retries
-
setSlowConsumerRetries
public void setSlowConsumerRetries(int slowConsumerRetries) -
getSlowConsumerReadTimeout
public int getSlowConsumerReadTimeout() -
setSlowConsumerReadTimeout
public void setSlowConsumerReadTimeout(int slowConsumerReadTimeout) -
getSlowConsumerThroughput
public int getSlowConsumerThroughput()- Specified by:
getSlowConsumerThroughputin interfaceITransportConfig- Returns:
- Slow Consumer Throughput
-
setSlowConsumerThroughput
public void setSlowConsumerThroughput(int slowConsumerThroughput) -
getReadSelectorThreads
public int getReadSelectorThreads()- Specified by:
getReadSelectorThreadsin interfaceITransportConfig- Returns:
- Returns the _readSelectorThreads.
-
getSystemPriorityQueueCapacity
public int getSystemPriorityQueueCapacity()- Specified by:
getSystemPriorityQueueCapacityin interfaceITransportConfig- Returns:
- LRMI number of system read selector threads
-
getSystemPriorityThreadIdleTimeout
public long getSystemPriorityThreadIdleTimeout()- Specified by:
getSystemPriorityThreadIdleTimeoutin interfaceITransportConfig
-
getSystemPriorityMinThreads
public int getSystemPriorityMinThreads() -
getSystemPriorityMaxThreads
public int getSystemPriorityMaxThreads() -
getCustomQueueCapacity
public int getCustomQueueCapacity() -
getCustomThreadIdleTimeout
public long getCustomThreadIdleTimeout() -
getCustomMinThreads
public int getCustomMinThreads() -
getCustomMaxThreads
public int getCustomMaxThreads() -
getWatchdogRequestTimeout
public long getWatchdogRequestTimeout()- Specified by:
getWatchdogRequestTimeoutin interfaceITransportConfig- Returns:
- Returns the _watchdogRequestTimeout.
-
getWatchdogListeningTimeout
public long getWatchdogListeningTimeout()- Specified by:
getWatchdogListeningTimeoutin interfaceITransportConfig- Returns:
- Returns the _watchdogListeningTimeout.
-
getWatchdogIdleConnectionTimeout
public long getWatchdogIdleConnectionTimeout()- Specified by:
getWatchdogIdleConnectionTimeoutin interfaceITransportConfig- Returns:
- Returns the _watchdogIdleConnectionTimeout.
-
getThreadPoolIdleTimeout
public long getThreadPoolIdleTimeout()- Specified by:
getThreadPoolIdleTimeoutin interfaceITransportConfig- Returns:
- LRMI ThreadPool idle timeout
-
getSocketConnectTimeout
public long getSocketConnectTimeout()- Specified by:
getSocketConnectTimeoutin interfaceITransportConfig- Returns:
- The timeout on lrmi socket connect
-
isProtocolValidationEnabled
public boolean isProtocolValidationEnabled() -
toString
-