de.esprit.netsuite.server.cpu

## Class AgentSleeperThreadPool

- java.lang.Object
- - java.util.concurrent.AbstractExecutorService
  - - java.util.concurrent.ThreadPoolExecutor
    - - de.esprit.netsuite.common.AbstractThreadPool
      - - de.esprit.netsuite.server.cpu.ServerThreadPool
        - - de.esprit.netsuite.server.cpu.AgentSleeperThreadPool

- All Implemented Interfaces:
    Dumpable, ServerObject, java.util.concurrent.Executor, java.util.concurrent.ExecutorService

      public class AgentSleeperThreadPool
      extends ServerThreadPool

  This ThreadPool is used to execute async (sleepy) agents which do NOT consume much CPU time. This pool is NOT limited in order to allow as many agents of this type as necessary. Its core pool size is the same as the one of the worker thread pool.
  Author:
    Rainer Buesch

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor

      `java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgentSleeperThreadPool(ServerContext serverCtx)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `afterExecute(java.lang.Runnable r, java.lang.Throwable t)`
    `protected void` | `beforeExecute(java.lang.Thread t, java.lang.Runnable r)`
    `protected java.util.concurrent.ThreadFactory` | `createThreadFactory()`

    - ### Methods inherited from class de.esprit.netsuite.server.cpu.ServerThreadPool

      `getServerContext, getServerStatistic, sendErrorMail`

    - ### Methods inherited from class de.esprit.netsuite.common.AbstractThreadPool

      `toDumpString, toDumpString, toString, toString`

    - ### Methods inherited from class java.util.concurrent.ThreadPoolExecutor

      `allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, execute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated`

    - ### Methods inherited from class java.util.concurrent.AbstractExecutorService

      `invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit`

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

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

- - ### Constructor Detail

    - #### AgentSleeperThreadPool

          public AgentSleeperThreadPool(ServerContext serverCtx)

  - ### Method Detail

    - #### afterExecute

          protected void afterExecute(java.lang.Runnable r,
                          java.lang.Throwable t)

      Overrides:
        `afterExecute` in class `AbstractThreadPool`

    - #### beforeExecute

          protected void beforeExecute(java.lang.Thread t,
                           java.lang.Runnable r)

      Overrides:
        `beforeExecute` in class `java.util.concurrent.ThreadPoolExecutor`

    - #### createThreadFactory

          protected java.util.concurrent.ThreadFactory createThreadFactory()

      Specified by:
        `createThreadFactory` in class `AbstractThreadPool`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.