com.deltavsoft.rcfproto

## Class ThreadPool

- java.lang.Object
- - com.deltavsoft.rcfproto.ThreadPool

-     public class ThreadPool
      extends java.lang.Object

  Represents a server-side thread pool.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ThreadPool(long fixedThreadCount)`
    `ThreadPool(long threadMinCount, long threadMaxCount)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `delete()`
    `protected void` | `finalize()`
    `protected static long` | `getCPtr(ThreadPool obj)`
    `boolean` | `getReserveLastThread()`
    `long` | `getThreadIdleTimeoutMs()` Returns the thread idle timeout value, in milliseconds.
    `long` | `getThreadMaxCount()` Returns the maximum number of threads in the thread pool.
    `long` | `getThreadMinCount()` Returns the minimum number of threads in the thread pool.
    `java.lang.String` | `getThreadName()` Returns the thread name of the thread pool threads.
    `void` | `setReserveLastThread(boolean reserveLastThread)` If this setting is true, clients will receive an error message right away, if all threads in the thread pool are busy.
    `void` | `setThreadIdleTimeoutMs(long threadIdleTimeoutMs)` Sets the thread idle timeout value, in milliseconds.
    `void` | `setThreadMaxCount(long threadMaxCount)` Sets the maximum number of threads in the thread pool.
    `void` | `setThreadMinCount(long threadMinCount)` Sets the minimum number of threads in the thread pool.
    `void` | `setThreadName(java.lang.String threadName)` Sets the thread name of the thread pool threads, as visible in a debugger.

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

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ThreadPool

          public ThreadPool(long fixedThreadCount)

    - #### ThreadPool

          public ThreadPool(long threadMinCount,
                    long threadMaxCount)

  - ### Method Detail

    - #### getCPtr

          protected static long getCPtr(ThreadPool obj)

    - #### finalize

          protected void finalize()

      Overrides:
        `finalize` in class `java.lang.Object`

    - #### delete

          public void delete()

    - #### setThreadMinCount

          public void setThreadMinCount(long threadMinCount)

      Sets the minimum number of threads in the thread pool.

    - #### getThreadMinCount

          public long getThreadMinCount()

      Returns the minimum number of threads in the thread pool.

    - #### setThreadMaxCount

          public void setThreadMaxCount(long threadMaxCount)

      Sets the maximum number of threads in the thread pool.

    - #### getThreadMaxCount

          public long getThreadMaxCount()

      Returns the maximum number of threads in the thread pool.

    - #### setThreadIdleTimeoutMs

          public void setThreadIdleTimeoutMs(long threadIdleTimeoutMs)

      Sets the thread idle timeout value, in milliseconds. After a thread has been idle for this time, it will be shut down, unless the thread count is already at the minimum value for the thread pool.

    - #### getThreadIdleTimeoutMs

          public long getThreadIdleTimeoutMs()

      Returns the thread idle timeout value, in milliseconds.

    - #### setReserveLastThread

          public void setReserveLastThread(boolean reserveLastThread)

      If this setting is true, clients will receive an error message right away, if all threads in the thread pool are busy. Otherwise, the client will wait for a thread in the thread pool to become free.

    - #### getReserveLastThread

          public boolean getReserveLastThread()

    - #### setThreadName

          public void setThreadName(java.lang.String threadName)

      Sets the thread name of the thread pool threads, as visible in a debugger.

    - #### getThreadName

          public java.lang.String getThreadName()

      Returns the thread name of the thread pool threads.