private static IRoutingEntry GetRoutingEntry(IRoutingKey routingKey, IRoutingLookupFactory factory, IRoutingDiagnostics diagnostics) { IRoutingLookup lookupForType = factory.GetLookupForType(routingKey.RoutingItemType); IRoutingEntry routingEntry = null; if (lookupForType != null) { routingEntry = lookupForType.GetRoutingEntry(routingKey, diagnostics); if (routingEntry != null && (routingEntry.Destination.RoutingItemType == RoutingItemType.Error || routingEntry.Destination.RoutingItemType == RoutingItemType.Unknown)) { routingEntry = null; } } return(routingEntry); }
public ServerLocator(ISharedCacheClient anchorMailboxCacheClient, ISharedCacheClient mailboxServerCacheClient, IRoutingLookupFactory locatorServiceLookupFactory) { if (anchorMailboxCacheClient == null) { throw new ArgumentNullException("anchorMailboxCacheClient"); } if (mailboxServerCacheClient == null) { throw new ArgumentNullException("mailboxServerCacheClient"); } if (locatorServiceLookupFactory == null) { throw new ArgumentNullException("locatorServiceLookupFactory"); } this.anchorMailboxCacheClient = anchorMailboxCacheClient; this.mailboxServerCacheClient = mailboxServerCacheClient; this.locatorServiceLookupFactory = locatorServiceLookupFactory; this.sharedCacheLookupFactory = new SharedCacheLookupFactory(this.anchorMailboxCacheClient, this.mailboxServerCacheClient); }
public RouteSelector(ISharedCacheClient anchorMailboxSharedCacheClient, ISharedCacheClient mailboxServerSharedCacheClient, IRoutingLookupFactory locatorServiceLookupFactory) { if (anchorMailboxSharedCacheClient == null) { throw new ArgumentNullException("anchorMailboxCacheClient"); } if (mailboxServerSharedCacheClient == null) { throw new ArgumentNullException("mailboxServerCacheClient"); } if (locatorServiceLookupFactory == null) { throw new ArgumentNullException("locatorServiceLookupFactory"); } this.Initialize(anchorMailboxSharedCacheClient, mailboxServerSharedCacheClient, locatorServiceLookupFactory); }
private void Initialize(ISharedCacheClient anchorMailboxSharedCacheClient, ISharedCacheClient mailboxServerSharedCacheClient, IRoutingLookupFactory locatorServiceLookupFactory) { this.anchorMailboxSharedCacheClient = anchorMailboxSharedCacheClient; this.mailboxServerSharedCacheClient = mailboxServerSharedCacheClient; this.locatorServiceLookupFactory = locatorServiceLookupFactory; }
public RoutingUpdateModule(IRoutingLookupFactory lookupFactory = null, IRoutingDiagnostics diagnostics = null) { this.lookupFactory = (lookupFactory ?? new RoutingEntryLookupFactory(RoutingUpdateModule.activeCopiesCacheProvider, new ActiveDirectoryUserProvider(RoutingUpdateModule.RUMUseADCache.Value))); this.diagnostics = (diagnostics ?? new RoutingUpdateDiagnostics()); }