public override void EvaluateState(bool expired) { if (this.Status != IncomingEntry.IncomingEntryStatus.Failed && ExceptionHandler.IsFaulted(base.Message)) { this.Status = IncomingEntry.IncomingEntryStatus.Failed; return; } switch (this.Status) { case IncomingEntry.IncomingEntryStatus.Initialized: if (base.RetryCount > TaskDistributionSettings.IncomingEntryRetriesToFailure) { ExceptionHandler.FaultMessage(base.Message, FaultDefinition.FromErrorString("Processing Failed", "EvaluateState", "f:\\15.00.1497\\sources\\dev\\EDiscovery\\src\\TaskDistributionSystem\\TaskDistributionFabric\\Routing\\Cache\\IncomingEntry.cs", 278), true); this.Status = IncomingEntry.IncomingEntryStatus.Failed; } break; case IncomingEntry.IncomingEntryStatus.Processed: if (base.RetryCount > TaskDistributionSettings.IncomingEntryRetriesToFailure) { ExceptionHandler.FaultMessage(base.Message, FaultDefinition.FromErrorString("Ougoing messages not retunred", "EvaluateState", "f:\\15.00.1497\\sources\\dev\\EDiscovery\\src\\TaskDistributionSystem\\TaskDistributionFabric\\Routing\\Cache\\IncomingEntry.cs", 287), true); this.Status = IncomingEntry.IncomingEntryStatus.Failed; } if (this.outgoingKeys.Count == 0) { this.Status = IncomingEntry.IncomingEntryStatus.Returned; } break; case IncomingEntry.IncomingEntryStatus.Returned: if (base.RetryCount > TaskDistributionSettings.IncomingEntryRetriesToFailure) { ExceptionHandler.FaultMessage(base.Message, FaultDefinition.FromErrorString("Recording of results Failed", "EvaluateState", "f:\\15.00.1497\\sources\\dev\\EDiscovery\\src\\TaskDistributionSystem\\TaskDistributionFabric\\Routing\\Cache\\IncomingEntry.cs", 303), true); this.Status = IncomingEntry.IncomingEntryStatus.Failed; } this.ReturnMessage(); break; case IncomingEntry.IncomingEntryStatus.Failed: if (!ExceptionHandler.IsFaulted(base.Message)) { ExceptionHandler.FaultMessage(base.Message, FaultDefinition.FromErrorString("Unknown failure", "EvaluateState", "f:\\15.00.1497\\sources\\dev\\EDiscovery\\src\\TaskDistributionSystem\\TaskDistributionFabric\\Routing\\Cache\\IncomingEntry.cs", 313), true); } this.FailMessage(); break; } if (base.RetryCount > TaskDistributionSettings.IncomingEntryRetriesToAbandon) { base.KeepAlive = false; return; } base.KeepAlive = true; }
public void CompleteOutgoingEntry(ComplianceMessage message) { OutgoingEntry outgoingEntry = this.GetOutgoingEntry(message, true); if (outgoingEntry != null) { int num; this.outgoingKeys.TryRemove(outgoingEntry.GetKey(), out num); outgoingEntry.Status = OutgoingEntry.OutgoingEntryStatus.Completed; } if (this.outgoingKeys.Count == 0 && this.Status == IncomingEntry.IncomingEntryStatus.Processed) { this.Status = IncomingEntry.IncomingEntryStatus.Returned; } }