Package org.apache.batchee.container.services.kernel

## Class DefaultBatchKernel

- java.lang.Object
- - org.apache.batchee.container.services.kernel.DefaultBatchKernel

- All Implemented Interfaces:
    `BatchKernelService`, `BatchService`

      public class DefaultBatchKernel
      extends Object
      implements BatchKernelService

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultBatchKernel​(ServicesManager servicesManager)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `BatchFlowInSplitWorkUnit` | `buildNewFlowInSplitWorkUnit​(FlowInSplitBuilderConfig config, JobContextImpl jc)` |
    `List<BatchPartitionWorkUnit>` | `buildNewParallelPartitions​(PartitionsBuilderConfig config, JobContextImpl jc, StepContextImpl sc)` | Build a list of batch work units and set them up in STARTING state but don't start them yet.
    `BatchFlowInSplitWorkUnit` | `buildOnRestartFlowInSplitWorkUnit​(FlowInSplitBuilderConfig config, JobContextImpl jc)` |
    `List<BatchPartitionWorkUnit>` | `buildOnRestartParallelPartitions​(PartitionsBuilderConfig config, JobContextImpl jc, StepContextImpl sc)` |
    `InternalJobExecution` | `getJobExecution​(long executionId)` |
    `javax.batch.runtime.JobInstance` | `getJobInstance​(long executionId)` |
    `int` | `getJobInstanceCount​(String jobName)` |
    `void` | `init​(Properties pgcConfig)` |
    `boolean` | `isExecutionRunning​(long executionId)` |
    `void` | `jobExecutionDone​(RuntimeJobExecution jobExecution)` |
    `void` | `restartGeneratedJob​(BatchWorkUnit batchWork)` |
    `InternalJobExecution` | `restartJob​(long executionId, Properties jobOverrideProps)` |
    `void` | `startGeneratedJob​(BatchWorkUnit batchWork)` |
    `InternalJobExecution` | `startJob​(String jobXML, Properties jobParameters)` |
    `void` | `stopJob​(long executionId)` |
    `String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### DefaultBatchKernel

          public DefaultBatchKernel​(ServicesManager servicesManager)

  - ### Method Detail

    - #### init

          public void init​(Properties pgcConfig)
                    throws BatchContainerServiceException

      Specified by:
        `init` in interface `BatchService`
      Throws:
        `BatchContainerServiceException`

    - #### startJob

          public InternalJobExecution startJob​(String jobXML,
                                               Properties jobParameters)
                                        throws javax.batch.operations.JobStartException

      Specified by:
        `startJob` in interface `BatchKernelService`
      Throws:
        `javax.batch.operations.JobStartException`

    - #### stopJob

          public void stopJob​(long executionId)
                       throws javax.batch.operations.NoSuchJobExecutionException,
                              javax.batch.operations.JobExecutionNotRunningException

      Specified by:
        `stopJob` in interface `BatchKernelService`
      Throws:
        `javax.batch.operations.NoSuchJobExecutionException`
        `javax.batch.operations.JobExecutionNotRunningException`

    - #### restartJob

          public InternalJobExecution restartJob​(long executionId,
                                                 Properties jobOverrideProps)
                                          throws javax.batch.operations.JobRestartException,
                                                 javax.batch.operations.JobExecutionAlreadyCompleteException,
                                                 javax.batch.operations.JobExecutionNotMostRecentException,
                                                 javax.batch.operations.NoSuchJobExecutionException

      Specified by:
        `restartJob` in interface `BatchKernelService`
      Throws:
        `javax.batch.operations.JobRestartException`
        `javax.batch.operations.JobExecutionAlreadyCompleteException`
        `javax.batch.operations.JobExecutionNotMostRecentException`
        `javax.batch.operations.NoSuchJobExecutionException`

    - #### jobExecutionDone

          public void jobExecutionDone​(RuntimeJobExecution jobExecution)

      Specified by:
        `jobExecutionDone` in interface `BatchKernelService`

    - #### getJobExecution

          public InternalJobExecution getJobExecution​(long executionId)
                                               throws javax.batch.operations.NoSuchJobExecutionException

      Specified by:
        `getJobExecution` in interface `BatchKernelService`
      Throws:
        `javax.batch.operations.NoSuchJobExecutionException`

    - #### startGeneratedJob

          public void startGeneratedJob​(BatchWorkUnit batchWork)

      Specified by:
        `startGeneratedJob` in interface `BatchKernelService`

    - #### getJobInstanceCount

          public int getJobInstanceCount​(String jobName)

      Specified by:
        `getJobInstanceCount` in interface `BatchKernelService`

    - #### getJobInstance

          public javax.batch.runtime.JobInstance getJobInstance​(long executionId)

      Specified by:
        `getJobInstance` in interface `BatchKernelService`

    - #### buildNewParallelPartitions

          public List<BatchPartitionWorkUnit> buildNewParallelPartitions​(PartitionsBuilderConfig config,
                                                                         JobContextImpl jc,
                                                                         StepContextImpl sc)
                                                                  throws javax.batch.operations.JobRestartException,
                                                                         javax.batch.operations.JobStartException

      Build a list of batch work units and set them up in STARTING state but don't start them yet.
      Specified by:
        `buildNewParallelPartitions` in interface `BatchKernelService`
      Throws:
        `javax.batch.operations.JobRestartException`
        `javax.batch.operations.JobStartException`

    - #### buildOnRestartParallelPartitions

          public List<BatchPartitionWorkUnit> buildOnRestartParallelPartitions​(PartitionsBuilderConfig config,
                                                                               JobContextImpl jc,
                                                                               StepContextImpl sc)
                                                                        throws javax.batch.operations.JobRestartException,
                                                                               javax.batch.operations.JobExecutionAlreadyCompleteException,
                                                                               javax.batch.operations.JobExecutionNotMostRecentException

      Specified by:
        `buildOnRestartParallelPartitions` in interface `BatchKernelService`
      Throws:
        `javax.batch.operations.JobRestartException`
        `javax.batch.operations.JobExecutionAlreadyCompleteException`
        `javax.batch.operations.JobExecutionNotMostRecentException`

    - #### restartGeneratedJob

          public void restartGeneratedJob​(BatchWorkUnit batchWork)
                                   throws javax.batch.operations.JobRestartException

      Specified by:
        `restartGeneratedJob` in interface `BatchKernelService`
      Throws:
        `javax.batch.operations.JobRestartException`

    - #### buildNewFlowInSplitWorkUnit

          public BatchFlowInSplitWorkUnit buildNewFlowInSplitWorkUnit​(FlowInSplitBuilderConfig config,
                                                                      JobContextImpl jc)

      Specified by:
        `buildNewFlowInSplitWorkUnit` in interface `BatchKernelService`

    - #### buildOnRestartFlowInSplitWorkUnit

          public BatchFlowInSplitWorkUnit buildOnRestartFlowInSplitWorkUnit​(FlowInSplitBuilderConfig config,
                                                                            JobContextImpl jc)
                                                                     throws javax.batch.operations.JobRestartException,
                                                                            javax.batch.operations.JobExecutionAlreadyCompleteException,
                                                                            javax.batch.operations.JobExecutionNotMostRecentException

      Specified by:
        `buildOnRestartFlowInSplitWorkUnit` in interface `BatchKernelService`
      Throws:
        `javax.batch.operations.JobRestartException`
        `javax.batch.operations.JobExecutionAlreadyCompleteException`
        `javax.batch.operations.JobExecutionNotMostRecentException`

    - #### isExecutionRunning

          public boolean isExecutionRunning​(long executionId)

      Specified by:
        `isExecutionRunning` in interface `BatchKernelService`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`