Class JobAcquisitionContext


  • public class JobAcquisitionContext
    extends java.lang.Object
    Author:
    Thorben Lindhauer
    • Field Detail

      • rejectedJobBatchesByEngine

        protected java.util.Map<java.lang.String,​java.util.List<java.util.List<java.lang.String>>> rejectedJobBatchesByEngine
      • acquiredJobsByEngine

        protected java.util.Map<java.lang.String,​AcquiredJobs> acquiredJobsByEngine
      • additionalJobBatchesByEngine

        protected java.util.Map<java.lang.String,​java.util.List<java.util.List<java.lang.String>>> additionalJobBatchesByEngine
      • acquisitionException

        protected java.lang.Exception acquisitionException
      • acquisitionTime

        protected long acquisitionTime
      • isJobAdded

        protected boolean isJobAdded
    • Constructor Detail

      • JobAcquisitionContext

        public JobAcquisitionContext()
    • Method Detail

      • submitRejectedBatch

        public void submitRejectedBatch​(java.lang.String engineName,
                                        java.util.List<java.lang.String> jobIds)
      • submitAcquiredJobs

        public void submitAcquiredJobs​(java.lang.String engineName,
                                       AcquiredJobs acquiredJobs)
      • submitAdditionalJobBatch

        public void submitAdditionalJobBatch​(java.lang.String engineName,
                                             java.util.List<java.lang.String> jobIds)
      • reset

        public void reset()
      • areAllEnginesIdle

        public boolean areAllEnginesIdle()
        Returns:
        true, if for all engines there were less jobs acquired than requested
      • hasJobAcquisitionLockFailureOccurred

        public boolean hasJobAcquisitionLockFailureOccurred()
        true if at least one job could not be locked, regardless of engine
      • setAcquisitionTime

        public void setAcquisitionTime​(long acquisitionTime)
      • getAcquisitionTime

        public long getAcquisitionTime()
      • getAcquiredJobsByEngine

        public java.util.Map<java.lang.String,​AcquiredJobs> getAcquiredJobsByEngine()
        Jobs that were acquired in the current acquisition cycle.
        Returns:
      • getRejectedJobsByEngine

        public java.util.Map<java.lang.String,​java.util.List<java.util.List<java.lang.String>>> getRejectedJobsByEngine()
        Jobs that were rejected from execution in the acquisition cycle due to lacking execution resources. With an execution thread pool, these jobs could not be submitted due to saturation of the underlying job queue.
      • getAdditionalJobsByEngine

        public java.util.Map<java.lang.String,​java.util.List<java.util.List<java.lang.String>>> getAdditionalJobsByEngine()
        Jobs that have been acquired in previous cycles and are supposed to be re-submitted for execution
      • setAcquisitionException

        public void setAcquisitionException​(java.lang.Exception e)
      • getAcquisitionException

        public java.lang.Exception getAcquisitionException()
      • setJobAdded

        public void setJobAdded​(boolean isJobAdded)
      • isJobAdded

        public boolean isJobAdded()