public static InvalidationMessage TryFromReceivedData(byte[] buffer, int bufLen, out Exception ex) { ex = null; InvalidationMessage result = null; try { result = InvalidationMessage.FromReceivedData(buffer, bufLen); } catch (Exception ex2) { ex = ex2; } return result; }
public void BroadcastInvalidationMessage(OrganizationId orgId, Guid[] keys) { Guid orgId2 = Guid.Empty; if (orgId != null && !orgId.Equals(OrganizationId.ForestWideOrgId)) { orgId2 = orgId.ConfigurationUnit.ObjectGuid; if (orgId2.Equals(Guid.Empty)) { return; } } InvalidationMessage invalidationMessage = new InvalidationMessage(orgId2, keys); byte[] msg = invalidationMessage.ToSendMessage(); lock (this.sendSocketLockObj) { this.SendMessage(this.msgSendSocket, msg, this.msgSendEndPoint); } }
// Token: 0x0600615A RID: 24922 RVA: 0x0014B6B8 File Offset: 0x001498B8 protected override void InternalExecute() { EndPoint endPoint = this.msgReceiveEndPoint; Globals.LogEvent(DirectoryEventLogConstants.Tuple_PCStartingToReceiveInvalidationMessage, this.msgReceiveEndPoint.Address.ToString(), new object[] { this.msgReceiveEndPoint.Port }); while (!base.GotStopSignalFromTestCode) { try { Array.Clear(this.recvBuffer, 0, this.recvBuffer.Length); int bufLen = this.msgReceiveSocket.ReceiveFrom(this.recvBuffer, ref endPoint); Exception ex = null; InvalidationMessage invalidationMessage = InvalidationMessage.TryFromReceivedData(this.recvBuffer, bufLen, out ex); if (ex != null) { Globals.LogEvent(DirectoryEventLogConstants.Tuple_PCInvalidInvalidationMessageReceived, this.msgReceiveEndPoint.Address.ToString(), new object[] { this.msgReceiveEndPoint.Port, ex.Message }); } else { if (invalidationMessage.IsCacheClearMessage) { base.ProvisioningCache.Reset(); } else if (invalidationMessage.IsGlobal) { base.ProvisioningCache.RemoveGlobalDatas(invalidationMessage.CacheKeys); } else { base.ProvisioningCache.RemoveOrganizationDatas(invalidationMessage.OrganizationId, invalidationMessage.CacheKeys); } ProvisioningCache.IncrementReceivedInvalidationMsgNum(); } } catch (SocketException ex2) { Globals.LogEvent(DirectoryEventLogConstants.Tuple_PCFailedToReceiveInvalidationMessage, this.msgReceiveEndPoint.Address.ToString(), new object[] { this.msgReceiveEndPoint.Port, ex2.Message }); } catch (ObjectDisposedException ex3) { Globals.LogEvent(DirectoryEventLogConstants.Tuple_PCFailedToReceiveInvalidationMessage, this.msgReceiveEndPoint.Address.ToString(), new object[] { this.msgReceiveEndPoint.Port, ex3.Message }); throw ex3; } catch (SecurityException ex4) { Globals.LogEvent(DirectoryEventLogConstants.Tuple_PCFailedToReceiveInvalidationMessage, this.msgReceiveEndPoint.Address.ToString(), new object[] { this.msgReceiveEndPoint.Port, ex4.Message }); throw ex4; } } }
// Token: 0x06006149 RID: 24905 RVA: 0x0014B2FC File Offset: 0x001494FC public InvalidationMessage(Guid orgId, Guid[] keys) : this(orgId, keys, InvalidationMessage.IsGlobalCacheEntry(keys)) { }