示例#1
0
        /// <summary>
        /// This private method initializes the completion job.
        /// </summary>
        /// <param name="job">The parent job.</param>
        /// <param name="callback">The completion callback.</param>
        /// <param name="state">The object state.</param>
        /// <param name="AutoExecute">This method identifies whether the jobs will execute automatically and only signal after the complete method has been set.</param>
        /// <param name="throttleThreshold">The throttle threshold is the amount of queued jobs that 
        /// will trigger the throttle flag to be set.</param>
        /// <param name="trace">The trace flag determines whether the completion job should submit trace
        /// data during the job processing.</param>
        protected void Initialize(SecurityManagerJob job, CompletionJobCallBack callback, 
            object state, bool AutoExecute, int throttleThreshold, bool trace)
        {
			mParentJob = job;
			CompletionJobComplete = callback;
			mState = state;
			autoExecute=AutoExecute;
			if (autoExecute)
				mStatus = CompletionJobStatus.Submitting;

            mJobShouldTrace = trace;

            if (mDependencyList != null)
                mDependencyList.Clear();
            errorList.Clear();

            errorCount = 0;
            this.throttleThreshold = throttleThreshold;
            if (throttleThreshold > 0)
            {
                if (mThrottlingQueue == null)
                    mThrottlingQueue = new Queue<JobHolder>();
                else
                    mThrottlingQueue.Clear();
            }

            ThrottleSet();

            executingJobs = 0;
		}
示例#2
0
		/// <summary>
		/// This private method initializes the completion job.
		/// </summary>
		/// <param name="job">The parent job.</param>
		/// <param name="callback">The completion callback.</param>
		/// <param name="state">The object state.</param>
		protected void Initialize(SecurityManagerJob job, CompletionJobCallBack callback, object state)
		{
			Initialize(job, callback, state, false, 0, false);
		}
示例#3
0
		/// <summary>
		/// This private method initializes the completion job.
		/// </summary>
		/// <param name="job">The parent job.</param>
		/// <param name="callback">The completion callback.</param>
		/// <param name="state">The object state.</param>
		/// <param name="AutoExecute">This method identifies whether the jobs will execute automatically and only signal after the complete method has been set.</param>
        /// <param name="throttleThreshold">The throttle threshold is the amount of queued jobs that 
        /// will trigger the throttle flag to be set.</param>
        protected void Initialize(SecurityManagerJob job, CompletionJobCallBack callback, 
            object state, bool AutoExecute, int throttleThreshold)
		{
            Initialize(job, callback, state, AutoExecute, throttleThreshold, false);
        }
示例#4
0
		/// <summary>
		/// This private method reset the Completion job.
		/// </summary>
		public override void Reset()
		{
			base.Reset();
			mState = null;
			mStatus = CompletionJobStatus.Unset;
			CompletionJobComplete = null;
            //internalCallback = null;
            ThrottleSet();
            autoExecute = false;
            mJobShouldTrace = false;

            delCompletionJobReturn = null;
		}
示例#5
0
		/// <summary>
		/// This method is used to create a completion job.
		/// </summary>
		/// <param name="callback">The callback to use when the job is complete.</param>
		/// <param name="state">The callback state.</param>
		/// <param name="AutoExecute">The boolean property indicates whether the job request should execute immediately.</param>
        /// <param name="throttlingThreshold">This parameter specifies the maximum number of jobs that will be processed in parallel. If this is
        /// set to 0 or below throttling will not be implemented.</param>
		/// <returns>A completion job.</returns>
		public CompletionJob CreateCompletionJob(CompletionJobCallBack callback, object state, bool AutoExecute, int throttlingThreshold)
		{
            return null;// delCompletionJobGet(this, callback, state, AutoExecute, throttlingThreshold, false);
		}
示例#6
0
		/// <summary>
		/// This method is used to create a completion job.
		/// </summary>
		/// <param name="callback">The callback to use when the job is complete.</param>
		/// <param name="state">The callback state.</param>
		/// <returns>A completion job.</returns>
		public CompletionJob CreateCompletionJob(CompletionJobCallBack callback, object state)
		{
            return CreateCompletionJob(callback, state, false, 0);
		}
示例#7
0
		/// <summary>
		/// This method is used to create a completion job.
		/// </summary>
		/// <param name="callback">The callback to use when the job is complete.</param>
		/// <param name="AutoExecute">The boolean property indicates whether the job request should execute immediately.</param>
        /// <param name="throttleThreshold">This parameter specifies the maximum number of jobs that will be processed in parallel. If this is
        /// set to 0 or below throttling will not be implemented.</param>
		/// <returns>A completion job.</returns>
		public CompletionJob CreateCompletionJob(CompletionJobCallBack callback, bool AutoExecute, int throttleThreshold)
		{
            return CreateCompletionJob(callback, this.Data, AutoExecute, throttleThreshold);
		}
示例#8
0
		/// <summary>
		/// This method is used to create a completion job.
		/// </summary>
		/// <param name="callback">The callback to use when the job is complete.</param>
		/// <returns>A completion job.</returns>
		public CompletionJob CreateCompletionJob(CompletionJobCallBack callback)
		{
            return CreateCompletionJob(callback, this.Data, false, 0);
		}