de.esprit.netsuite.server.batch

## Class ServerBatchTaskExecutor

- java.lang.Object
- - java.util.concurrent.AbstractExecutorService
  - - java.util.concurrent.ThreadPoolExecutor
    - - java.util.concurrent.ScheduledThreadPoolExecutor
      - - de.esprit.netsuite.server.batch.ServerBatchTaskExecutor

- All Implemented Interfaces:
    ServerObject<ServerContext>, java.util.concurrent.Executor, java.util.concurrent.ExecutorService, java.util.concurrent.ScheduledExecutorService

      public class ServerBatchTaskExecutor
      extends java.util.concurrent.ScheduledThreadPoolExecutor
      implements ServerObject<ServerContext>

  This is a single threaded Executor for running time-scheduled `AbstractServerBatchTask`s
  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
    `ServerBatchTaskExecutor(ServerContext serverCtx)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `cancelCurrentTask(SessionId killerId)`
    `void` | `clearAll()`
    `AbstractServerBatchTask` | `getCurrentTask()`
    `ServerContext` | `getServerContext()` Returns the server runtime environment
    `boolean` | `hasCurrentTask()`
    `void` | `setCurrentTask(AbstractServerBatchTask currentTask)`

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

      `decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submit`

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

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

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

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

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

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

    - ### Methods inherited from interface java.util.concurrent.ExecutorService

      `awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated`

- - ### Constructor Detail

    - #### ServerBatchTaskExecutor

          public ServerBatchTaskExecutor(ServerContext serverCtx)

  - ### Method Detail

    - #### getServerContext

          public ServerContext getServerContext()

      Description copied from interface: `ServerObject`
      Returns the server runtime environment
      Specified by:
        `getServerContext` in interface `ServerObject<ServerContext>`

    - #### cancelCurrentTask

          public boolean cancelCurrentTask(SessionId killerId)

    - #### clearAll

          public void clearAll()

    - #### getCurrentTask

          public AbstractServerBatchTask getCurrentTask()

    - #### hasCurrentTask

          public boolean hasCurrentTask()

    - #### setCurrentTask

          public void setCurrentTask(AbstractServerBatchTask currentTask)

Copyright © 2013 EsprIT-Systems. All Rights Reserved.