Class BatchQueueServiceImpl.BatchCommand<T>

java.lang.Object
fr.becpg.repo.batch.BatchQueueServiceImpl.BatchCommand<T>
All Implemented Interfaces:
Runnable
Enclosing class:
BatchQueueServiceImpl

public class BatchQueueServiceImpl.BatchCommand<T> extends Object implements Runnable
  • Field Details

  • Constructor Details

  • Method Details

    • getBatchInfo

      public BatchInfo getBatchInfo()
    • getBatchId

      public String getBatchId()
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • pauseCommand

      private void pauseCommand(BatchQueueServiceImpl.BatchCommand<?> command)
    • pushAndSetBatchAuthentication

      private void pushAndSetBatchAuthentication(BatchStep<T> batchStep)
    • getNextWorkWrapper

      private org.alfresco.repo.batch.BatchProcessWorkProvider<T> getNextWorkWrapper(org.alfresco.repo.batch.BatchProcessWorkProvider<T> workProvider)
    • runStepInTransaction

      private BatchQueueServiceImpl.BatchCommand.StepOutcome runStepInTransaction(BatchStep<T> batchStep)
      The default: Alfresco's BatchProcessor opens a transaction around every entry.
    • runStepOutsideTransaction

      private BatchQueueServiceImpl.BatchCommand.StepOutcome runStepOutsideTransaction(BatchStep<T> batchStep)
      Runs the step without opening a transaction around it, for work that waits on something other than the database and must not hold a transaction while it does. The worker takes care of its own transactions. Everything the transactional path offers is kept: the same wrapper, so the same authentication, pause and cancellation handling and the same progress counter; one entry at a time, so a pause is honoured between entries; and an entry that throws is counted and logged without stopping the rest, as BatchProcessor does.
    • asReportedByBatchProcessor

      private String asReportedByBatchProcessor(Throwable t)
      Same shape as BatchProcessor.getLastError, so listeners see one thing.
    • runAsWrapper

      private org.alfresco.repo.batch.BatchProcessor.BatchProcessWorker<T> runAsWrapper(BatchStep<T> batchStep)
    • checkPausedCommand

      private void checkPausedCommand()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getEnclosingInstance

      private BatchQueueServiceImpl getEnclosingInstance()