예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUp() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        public virtual void setUp()
        {
            jobExecutor = (ControllableJobExecutor)((ProcessEngineConfigurationImpl)engineRule.ProcessEngine.ProcessEngineConfiguration).JobExecutor;
            jobExecutor.MaxJobsPerAcquisition = 2;
            acquisitionThread = jobExecutor.AcquisitionThreadControl;
            executionThread   = jobExecutor.ExecutionThreadControl;
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUp()
        public virtual void setUp()
        {
            defaultSetting = EngineConfig.DbEntityCacheReuseEnabled;
            EngineConfig.DbEntityCacheReuseEnabled = true;
            jobExecutor              = (ControllableJobExecutor)EngineConfig.JobExecutor;
            executionThreadControl   = jobExecutor.ExecutionThreadControl;
            acquisitionThreadControl = jobExecutor.AcquisitionThreadControl;
        }
예제 #3
0
        protected internal static ControllableJobExecutor buildControllableJobExecutor()
        {
            ControllableJobExecutor jobExecutor = new ControllableJobExecutor();

            jobExecutor.MaxJobsPerAcquisition = 2;
            jobExecutor.proceedAndWaitOnShutdown(false);
            return(jobExecutor);
        }
예제 #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUp() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        public virtual void setUp()
        {
            // two job executors with the default settings
            jobExecutor1 = (ControllableJobExecutor)((ProcessEngineConfigurationImpl)engineRule.ProcessEngine.ProcessEngineConfiguration).JobExecutor;
            jobExecutor1.MaxJobsPerAcquisition = DEFAULT_NUM_JOBS_TO_ACQUIRE;
            acquisitionThread1 = jobExecutor1.AcquisitionThreadControl;

            jobExecutor2 = new ControllableJobExecutor((ProcessEngineImpl)engineRule.ProcessEngine);
            jobExecutor2.MaxJobsPerAcquisition = DEFAULT_NUM_JOBS_TO_ACQUIRE;
            acquisitionThread2 = jobExecutor2.AcquisitionThreadControl;
        }
예제 #5
0
 protected internal override void suspendAcquisition(long millis)
 {
     LOG.debugJobAcquisitionThreadSleeping(millis);
     if (jobExecutor is ControllableJobExecutor)
     {
         ControllableJobExecutor controllableExecutor = (ControllableJobExecutor)jobExecutor;
         if (controllableExecutor.SyncAsSuspendEnabled)
         {
             controllableExecutor.AcquisitionThreadControl.sync();
         }
     }
 }
예제 #6
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUp() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        public virtual void setUp()
        {
            jobExecutor1 = (ControllableJobExecutor)((ProcessEngineConfigurationImpl)engineRule.ProcessEngine.ProcessEngineConfiguration).JobExecutor;
            jobExecutor1.MaxJobsPerAcquisition    = DEFAULT_NUM_JOBS_TO_ACQUIRE;
            jobExecutor1.BackoffTimeInMillis      = BASE_BACKOFF_TIME;
            jobExecutor1.MaxBackoff               = MAX_BACKOFF_TIME;
            jobExecutor1.BackoffDecreaseThreshold = BACKOFF_DECREASE_THRESHOLD;
            acquisitionThread1 = jobExecutor1.AcquisitionThreadControl;

            jobExecutor2 = new ControllableJobExecutor((ProcessEngineImpl)engineRule.ProcessEngine);
            jobExecutor2.MaxJobsPerAcquisition    = DEFAULT_NUM_JOBS_TO_ACQUIRE;
            jobExecutor2.BackoffTimeInMillis      = BASE_BACKOFF_TIME;
            jobExecutor2.MaxBackoff               = MAX_BACKOFF_TIME;
            jobExecutor2.BackoffDecreaseThreshold = BACKOFF_DECREASE_THRESHOLD;
            acquisitionThread2 = jobExecutor2.AcquisitionThreadControl;
        }
예제 #7
0
 public RecordingAcquireJobsRunnable(ControllableJobExecutor jobExecutor) : base(jobExecutor)
 {
 }
예제 #8
0
 public ControllableAcquisitionCommand(ControllableJobExecutor outerInstance, ThreadControl threadControl, int numJobsToAcquire) : base(threadControl)
 {
     this.outerInstance    = outerInstance;
     this.numJobsToAcquire = numJobsToAcquire;
 }
예제 #9
0
 public ControllableJobAcquisitionCommandFactory(ControllableJobExecutor outerInstance)
 {
     this.outerInstance = outerInstance;
 }