예제 #1
0
        public virtual void Distribute()
        {
            var distributor = new LuceneActivityDistributor()
            {
                Activity = this
            };

            distributor.Execute();
            DistributedLuceneActivity.WriteMSMQLog(this, MSMQLogStatusType.SENT);
        }
예제 #2
0
            public override void DoAction(bool onRemote, bool isFromMe)
            {
                if (!LuceneManager.Running)
                {
                    return;
                }

                //Trace.WriteLine(String.Format("@#$> T:{0} LuceneActivityDistributor.DoAction: {1}. onRemote: {2}, isFromMe:{3}", System.Threading.Thread.CurrentThread.ManagedThreadId, Activity.GetType().Name, onRemote, isFromMe));

                if (onRemote && !isFromMe)
                {
                    DistributedLuceneActivity.WriteMSMQLog(this.Activity, MSMQLogStatusType.RECEIVED);
                    this.Activity.InternalExecute();
                }
            }
예제 #3
0
        private static void WriteMSMQLog(DistributedLuceneActivity activity, MSMQLogStatusType statusType)
        {
            if (!MSMQLogEnabled)
            {
                return;
            }

            var pAct = activity as LuceneIndexingActivity;

            if (pAct == null)
            {
                return;
            }

            WriteMSMQLog(pAct.ActivityId, statusType, null);
        }