|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gigaspaces.config.lrmi.AbstractTransportConfigration
com.gigaspaces.config.lrmi.nio.NIOConfiguration
public class NIOConfiguration
This class provides configuration object of NIO communication transport protocol.
GenericExporter
,
Serialized FormConstructor Summary | |
---|---|
NIOConfiguration()
Should not be used, only for externalizable. |
|
NIOConfiguration(int bindPort)
|
|
NIOConfiguration(int minThreads,
int maxThreads,
int maxConnPool,
boolean isMultiplex,
String bindHostName,
String bindPort)
Deprecated. use #NIOConfiguration(int, int, int, String, int) instead |
|
NIOConfiguration(int minThreads,
int maxThreads,
int maxConnPool,
boolean isMultiplex,
String bindHostName,
String bindPort,
int threadsQueueSize,
int slowConsumerThroughput,
int slowConsumerLatency,
int slowConsumerRetries)
Deprecated. use #NIOConfiguration( int, int, int, String, int, int, int, int, int) |
|
NIOConfiguration(int minThreads,
int maxThreads,
int maxConnPool,
boolean isMultiplex,
String bindHostName,
String bindPort,
int threadsQueueSize,
int slowConsumerThroughput,
int slowConsumerLatency,
int slowConsumerRetries,
int readSelectorThreads,
String watchdogRequestTimeout,
String watchdogListeningTimeout,
String watchdogIdleConnectionTimeout,
long threadPoolIdleTimeout,
String socketConnectTimeout)
Deprecated. use #NIOConfiguration( int, int, int, String, int, int, int, int,
int, int, String, String, String, long, String) instead |
|
NIOConfiguration(int minThreads,
int maxThreads,
int maxConnPool,
boolean isMultiplex,
String bindHostName,
String bindPort,
int readSelectorThreads,
String watchdogRequestTimeout,
String watchdogListeningTimeout,
String watchdogIdleConnectionTimeout,
long threadPoolIdleTimeout,
String socketConnectTimeout)
Deprecated. use #NIOConfiguration( int, int, int, String, int, int, String, String, String, long, String) |
|
NIOConfiguration(int minThreads,
int maxThreads,
int maxConnPool,
String bindHostName,
String bindPort)
|
|
NIOConfiguration(int minThreads,
int maxThreads,
int maxConnPool,
String bindHostName,
String bindPort,
int threadsQueueSize,
int slowConsumerThroughput,
int slowConsumerLatency,
int slowConsumerRetries)
|
|
NIOConfiguration(int minThreads,
int maxThreads,
int maxConnPool,
String bindHostName,
String bindPort,
int threadsQueueSize,
int slowConsumerThroughput,
int slowConsumerLatency,
int slowConsumerRetries,
int readSelectorThreads,
String watchdogRequestTimeout,
String watchdogListeningTimeout,
String watchdogIdleConnectionTimeout,
long threadPoolIdleTimeout,
String socketConnectTimeout)
Constructor. |
|
NIOConfiguration(int minThreads,
int maxThreads,
int maxConnPool,
String bindHostName,
String bindPort,
int readSelectorThreads,
String watchdogRequestTimeout,
String watchdogListeningTimeout,
String watchdogIdleConnectionTimeout,
long threadPoolIdleTimeout,
String socketConnectTimeout)
The most commonly used constructor through the services.config configuration file. |
|
NIOConfiguration(String bindPort)
|
Methods inherited from class com.gigaspaces.config.lrmi.AbstractTransportConfigration |
---|
getProtocolAdaptorClass |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
@Deprecated public NIOConfiguration(int minThreads, int maxThreads, int maxConnPool, boolean isMultiplex, String bindHostName, String bindPort)
#NIOConfiguration(int, int, int, String, int)
instead
public NIOConfiguration(int minThreads, int maxThreads, int maxConnPool, String bindHostName, String bindPort)
@Deprecated public NIOConfiguration(int minThreads, int maxThreads, int maxConnPool, boolean isMultiplex, String bindHostName, String bindPort, int readSelectorThreads, String watchdogRequestTimeout, String watchdogListeningTimeout, String watchdogIdleConnectionTimeout, long threadPoolIdleTimeout, String socketConnectTimeout)
#NIOConfiguration( int, int, int, String, int, int, String, String, String, long, String)
public NIOConfiguration(int minThreads, int maxThreads, int maxConnPool, String bindHostName, String bindPort, int readSelectorThreads, String watchdogRequestTimeout, String watchdogListeningTimeout, String watchdogIdleConnectionTimeout, long threadPoolIdleTimeout, String socketConnectTimeout)
@Deprecated public NIOConfiguration(int minThreads, int maxThreads, int maxConnPool, boolean isMultiplex, String bindHostName, String bindPort, int threadsQueueSize, int slowConsumerThroughput, int slowConsumerLatency, int slowConsumerRetries, int readSelectorThreads, String watchdogRequestTimeout, String watchdogListeningTimeout, String watchdogIdleConnectionTimeout, long threadPoolIdleTimeout, String socketConnectTimeout)
#NIOConfiguration( int, int, int, String, int, int, int, int,
int, int, String, String, String, long, String)
instead
public NIOConfiguration(int minThreads, int maxThreads, int maxConnPool, String bindHostName, String bindPort, int threadsQueueSize, int slowConsumerThroughput, int slowConsumerLatency, int slowConsumerRetries, int readSelectorThreads, String watchdogRequestTimeout, String watchdogListeningTimeout, String watchdogIdleConnectionTimeout, long threadPoolIdleTimeout, String socketConnectTimeout)
minThreads
- Maintains thread pool in Client and Server that manage incoming remote requests.
The thread pool size is increased each time with one additional thread and shrinks when existing
threads are not used for 5 minutes. This parameter specifies the minimum size of this thread pool.maxThreads
- This parameter specifies the maximum size of this thread pool.
You should make sure the pool max size will accommodate the maximum number of concurrent
requests to the serverEndPoint.
When the pool is exhausted and all threads are consumed to process incoming requests,
additional requests will be blocked until existing requested processing will be completed.maxConnPool
- Client connection pool maximum size to server. Starts with 1 connection.isMultiplex
- This property should be set to true if there are many concurrent connections
to the serverEndPoint. When running many concurrent remote clients the serverEndPoint by default
opens a dedicated network channel and thread for each remote client.
These network channel consumes resources. To optimize the serverEndPoint handling with concurrent
access set isMultiplex=true. This allows the serverEndPoint to share the same network channel and
thread pool for multiple concurrent clients.
In general when running in isMultiplex=false the serverEndPoint generates and maintains thread pool
and different space resources per connection.
This is very expensive both in terms of CPU and memory when having many users - even with more than
3 connections!. The isMultiplex=false is relevant only for very few concurrent connections (1-3).bindHostName
- The host address the server socket is bound to.
Relevant for the multi-NIC environment. If null
resolves to the localhost IP address.bindPort
- the bind port used for incoming client requests.
The server port is set by default to 0, which means next free port.
This means that whenever the serverEndPoint is launched it allocates one of the available ports.
Define a specific port value to enforce a specific port for the serverEndPoint.threadsQueueSize
- Maintains thread pool queue size in Client and Server that manage incoming
remote requests. Once the queue sized is reached the incoming messages are blocked.slowConsumerThroughput
- a client that its network throughput doesn't reach this limit will be suspected
as slow.slowConsumerLatency
- a client that is suspected as slow that will not be recover
after this time will be disconnected.slowConsumerRetries
- the number of retries to recover a client that is suspected as slow.readSelectorThreads
- LRMI number of read selector threads default = 1.watchdogRequestTimeout
- LRMI Watchdog request timeout.watchdogListeningTimeout
- LRMI Watchdog Listening timeout.watchdogIdleConnectionTimeout
- threadPoolIdleTimeout
- LRMI ThreadPool idle timeoutsocketConnectTimeout
- The timeout on lrmi socket connect.SystemProperties.LRMI_READ_SELECTOR_THREADS
,
SystemProperties.WATCHDOG_REQUEST_TIMEOUT_DEFAULT
,
SystemProperties.WATCHDOG_LISTENING_TIMEOUT_DEFAULT
@Deprecated public NIOConfiguration(int minThreads, int maxThreads, int maxConnPool, boolean isMultiplex, String bindHostName, String bindPort, int threadsQueueSize, int slowConsumerThroughput, int slowConsumerLatency, int slowConsumerRetries)
#NIOConfiguration( int, int, int, String, int, int, int, int, int)
public NIOConfiguration(int minThreads, int maxThreads, int maxConnPool, String bindHostName, String bindPort, int threadsQueueSize, int slowConsumerThroughput, int slowConsumerLatency, int slowConsumerRetries)
public NIOConfiguration()
public NIOConfiguration(int bindPort)
public NIOConfiguration(String bindPort)
Method Detail |
---|
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public int getConnectionPoolSize()
getConnectionPoolSize
in interface com.gigaspaces.config.lrmi.ITransportConfig
public void setMinThreads(int minThreads)
public void setMaxThreads(int maxThreads)
public void setMaxConnPool(int maxConnPool)
public void setBindHost(String bindHostName)
public void setBindPort(String bindPort)
public void setBlockingConnection(boolean blockingConnection)
public int getMinThreads()
public int getMaxThreads()
public int getMaxConnPool()
public String getBindPort()
public String getBindHostName()
public final String getProtocolName()
getProtocolName
in interface com.gigaspaces.config.lrmi.ITransportConfig
public boolean isBlockingConnection()
isBlockingConnection
in interface com.gigaspaces.config.lrmi.ITransportConfig
public int getThreadsQueueSize()
public void setThreadsQueueSize(int threadsQueueSize)
public int getSlowConsumerLatency()
getSlowConsumerLatency
in interface com.gigaspaces.config.lrmi.ITransportConfig
public void setSlowConsumerLatency(int slowConsumerLatency)
public int getSlowConsumerRetries()
getSlowConsumerRetries
in interface com.gigaspaces.config.lrmi.ITransportConfig
public void setSlowConsumerRetries(int slowConsumerRetries)
public int getSlowConsumerThroughput()
getSlowConsumerThroughput
in interface com.gigaspaces.config.lrmi.ITransportConfig
public void setSlowConsumerThroughput(int slowConsumerThroughput)
public int getReadSelectorThreads()
getReadSelectorThreads
in interface com.gigaspaces.config.lrmi.ITransportConfig
public void setReadSelectorThreads(int selectorThreads)
setReadSelectorThreads
in interface com.gigaspaces.config.lrmi.ITransportConfig
selectorThreads
- The _readSelectorThreads to set.public long getWatchdogRequestTimeout()
getWatchdogRequestTimeout
in interface com.gigaspaces.config.lrmi.ITransportConfig
public void setWatchdogRequestTimeout(long requestTimeout)
setWatchdogRequestTimeout
in interface com.gigaspaces.config.lrmi.ITransportConfig
requestTimeout
- The _watchdogRequestTimeout to set.public long getWatchdogListeningTimeout()
getWatchdogListeningTimeout
in interface com.gigaspaces.config.lrmi.ITransportConfig
public void setWatchdogListeningTimeout(long listeningTimeout)
setWatchdogListeningTimeout
in interface com.gigaspaces.config.lrmi.ITransportConfig
listeningTimeout
- The _watchdogListeningTimeout to set.public long getWatchdogIdleConnectionTimeout()
getWatchdogIdleConnectionTimeout
in interface com.gigaspaces.config.lrmi.ITransportConfig
public void setWatchdogIdleConnectionTimeout(long idleConnectionTimeout)
setWatchdogIdleConnectionTimeout
in interface com.gigaspaces.config.lrmi.ITransportConfig
idleConnectionTimeout
- The _watchdogIdleConnectionTimeout to set.public long getThreadPoolIdleTimeout()
getThreadPoolIdleTimeout
in interface com.gigaspaces.config.lrmi.ITransportConfig
public void setThreadPoolIdleTimeout(long threadPoolIdleTimeout)
setThreadPoolIdleTimeout
in interface com.gigaspaces.config.lrmi.ITransportConfig
public long getSocketConnectTimeout()
getSocketConnectTimeout
in interface com.gigaspaces.config.lrmi.ITransportConfig
public void setSocketConnectTimeout(long socketConnectTimeout)
setSocketConnectTimeout
in interface com.gigaspaces.config.lrmi.ITransportConfig
public NIOConfiguration clone()
clone
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |