EldoS
MsgConnect home / Documentation / HttpTransportClient.ThreadPoolSize property
Navigation
Web site
Support
Table Of Contents

Java ME 


HttpTransportClient.ThreadPoolSize

HttpTransportClient     See also    


Defines the size of the thread pool.

Declaration

[Java ME]
    public void setThreadPoolSize(int value);
    public int getThreadPoolSize();

Description

    Use ThreadPoolSize to define the thread pool size. Thread pool is a list of threads that are created when the transport is activated and kept in reserve. When the transport needs a thread to handle TCP connection, it takes an available thread from the pool. When the thread is no longer needed, it is returned to the pool. As you know, thread creation and disposal is a time-consuming operation, so thread pool lets you speed up operations. If there are no available threads in the pool, new thread is created instead of taking it from the pool. When the pool is empty, unused thread is not placed to the queue, but disposed of instead. Set the property to 0 to prevent creation fo pooled threads. When the value is 0, the threads are allocated and deallocated when needed.
    Use thread pool when the number of expected connections is estimated to change not significantly and to be greater than 0. If the connections are occasional, use of thread pool will only consume system resources without giving any benefits.

 
Contact Us | Subscribe | Terms of Use | Trademarks | Privacy Statement
Copyright (c) 1998-2005, EldoS Corporation