org.jbpm.executor.impl

## Class ExecutorImpl

- java.lang.Object
- - org.jbpm.executor.impl.ExecutorImpl

- All Implemented Interfaces:
    org.kie.api.executor.Executor

      public class ExecutorImpl
      extends Object
      implements org.kie.internal.executor.api.Executor

  Default implementation of the `Executor` that is baced by `ScheduledExecutorService` for background task execution. It can be configured for following:
  - thread pool size - default 1 - use system property org.kie.executor.pool.size
  - retry count - default 3 retries - use system property org.kie.executor.retry.count
  - execution interval - default 3 seconds - use system property org.kie.executor.interval
  Additionally executor can be disable to not start at all when system property org.kie.executor.disabled is set to true

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExecutorImpl()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cancelRequest(Long requestId)`
    `void` | `destroy()`
    `int` | `getInterval()`
    `int` | `getRetries()`
    `int` | `getThreadPoolSize()`
    `TimeUnit` | `getTimeunit()`
    `void` | `init()`
    `void` | `init(ThreadFactory threadFactory)`
    `Long` | `scheduleRequest(String commandId, org.kie.api.executor.CommandContext ctx)`
    `Long` | `scheduleRequest(String commandId, Date date, org.kie.api.executor.CommandContext ctx)`
    `void` | `setExecutorStoreService(org.kie.api.executor.ExecutorStoreService executorStoreService)`
    `void` | `setInterval(int interval)`
    `void` | `setRetries(int retries)`
    `void` | `setThreadPoolSize(int threadPoolSize)`
    `void` | `setTimeunit(TimeUnit timeunit)`

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

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

- - ### Constructor Detail

    - #### ExecutorImpl

          public ExecutorImpl()

  - ### Method Detail

    - #### setExecutorStoreService

          public void setExecutorStoreService(org.kie.api.executor.ExecutorStoreService executorStoreService)

    - #### getInterval

          public int getInterval()

      Specified by:
        `getInterval` in interface `org.kie.api.executor.Executor`

    - #### setInterval

          public void setInterval(int interval)

      Specified by:
        `setInterval` in interface `org.kie.api.executor.Executor`

    - #### getRetries

          public int getRetries()

      Specified by:
        `getRetries` in interface `org.kie.api.executor.Executor`

    - #### setRetries

          public void setRetries(int retries)

      Specified by:
        `setRetries` in interface `org.kie.api.executor.Executor`

    - #### getThreadPoolSize

          public int getThreadPoolSize()

      Specified by:
        `getThreadPoolSize` in interface `org.kie.api.executor.Executor`

    - #### setThreadPoolSize

          public void setThreadPoolSize(int threadPoolSize)

      Specified by:
        `setThreadPoolSize` in interface `org.kie.api.executor.Executor`

    - #### getTimeunit

          public TimeUnit getTimeunit()

      Specified by:
        `getTimeunit` in interface `org.kie.api.executor.Executor`

    - #### setTimeunit

          public void setTimeunit(TimeUnit timeunit)

      Specified by:
        `setTimeunit` in interface `org.kie.api.executor.Executor`

    - #### init

          public void init()

      Specified by:
        `init` in interface `org.kie.api.executor.Executor`

    - #### init

          public void init(ThreadFactory threadFactory)

    - #### destroy

          public void destroy()

      Specified by:
        `destroy` in interface `org.kie.api.executor.Executor`

    - #### scheduleRequest

          public Long scheduleRequest(String commandId,
                             org.kie.api.executor.CommandContext ctx)

      Specified by:
        `scheduleRequest` in interface `org.kie.api.executor.Executor`

    - #### scheduleRequest

          public Long scheduleRequest(String commandId,
                             Date date,
                             org.kie.api.executor.CommandContext ctx)

      Specified by:
        `scheduleRequest` in interface `org.kie.api.executor.Executor`

    - #### cancelRequest

          public void cancelRequest(Long requestId)

      Specified by:
        `cancelRequest` in interface `org.kie.api.executor.Executor`

Copyright © 2001–2015 JBoss by Red Hat. All rights reserved.