Package org.apache.batchee.container.util

## Class BatchWorkUnit

- java.lang.Object
- - org.apache.batchee.container.util.BatchWorkUnit

- All Implemented Interfaces:
    `Runnable`
  Direct Known Subclasses:
    `BatchParallelWorkUnit`

      public class BatchWorkUnit
      extends Object
      implements Runnable

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected BatchKernelService` | `batchKernel` |
    `protected ThreadRootController` | `controller` |
    `protected RuntimeJobExecution` | `jobExecutionImpl` |
    `protected boolean` | `notifyCallbackWhenDone` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BatchWorkUnit​(ServicesManager manager, RuntimeJobExecution jobExecutionImpl)` |
    `BatchWorkUnit​(ServicesManager manager, RuntimeJobExecution jobExecutionImpl, boolean notifyCallbackWhenDone)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `BatchKernelService` | `getBatchKernel()` |
    `protected javax.batch.runtime.BatchStatus` | `getBatchStatus()` |
    `ThreadRootController` | `getController()` |
    `protected String` | `getExitStatus()` |
    `RuntimeJobExecution` | `getJobExecutionImpl()` |
    `boolean` | `isNotifyCallbackWhenDone()` |
    `protected void` | `markThreadCompleted()` |
    `void` | `run()` |
    `void` | `setBatchKernel​(BatchKernelService batchKernel)` |
    `void` | `setJobExecutionImpl​(RuntimeJobExecution jobExecutionImpl)` |
    `void` | `setNotifyCallbackWhenDone​(boolean notifyCallbackWhenDone)` |

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

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

- - ### Field Detail

    - #### jobExecutionImpl

          protected RuntimeJobExecution jobExecutionImpl

    - #### batchKernel

          protected BatchKernelService batchKernel

    - #### controller

          protected ThreadRootController controller

    - #### notifyCallbackWhenDone

          protected boolean notifyCallbackWhenDone

  - ### Constructor Detail

    - #### BatchWorkUnit

          public BatchWorkUnit​(ServicesManager manager,
                               RuntimeJobExecution jobExecutionImpl)

    - #### BatchWorkUnit

          public BatchWorkUnit​(ServicesManager manager,
                               RuntimeJobExecution jobExecutionImpl,
                               boolean notifyCallbackWhenDone)

  - ### Method Detail

    - #### getController

          public ThreadRootController getController()

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`

    - #### getBatchStatus

          protected javax.batch.runtime.BatchStatus getBatchStatus()

    - #### getExitStatus

          protected String getExitStatus()

    - #### setBatchKernel

          public void setBatchKernel​(BatchKernelService batchKernel)

    - #### getBatchKernel

          public BatchKernelService getBatchKernel()

    - #### setJobExecutionImpl

          public void setJobExecutionImpl​(RuntimeJobExecution jobExecutionImpl)

    - #### getJobExecutionImpl

          public RuntimeJobExecution getJobExecutionImpl()

    - #### setNotifyCallbackWhenDone

          public void setNotifyCallbackWhenDone​(boolean notifyCallbackWhenDone)

    - #### isNotifyCallbackWhenDone

          public boolean isNotifyCallbackWhenDone()

    - #### markThreadCompleted

          protected void markThreadCompleted()