public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack) { endpointQueueMappings.AddOrUpdate( queueToTrack.EndpointName, id => queueToTrack.InputQueue, (id, old) => queueToTrack.InputQueue ); }
public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack) { endpointQueues.AddOrUpdate(queueToTrack.EndpointName, _ => queueToTrack.InputQueue, (_, currentValue) => { if (currentValue != queueToTrack.InputQueue) { sizes.TryRemove(currentValue, out var _); } return(queueToTrack.InputQueue); }); }
public bool Equals(EndpointToQueueMapping other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(string.Equals(EndpointName, other.EndpointName) && string.Equals(InputQueue, other.InputQueue)); }
public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack) { var queueName = BackwardsCompatibleQueueNameSanitizer.Sanitize(queueToTrack.InputQueue); var queueClient = CloudStorageAccount.Parse(connectionString).CreateCloudQueueClient(); var emptyQueueLength = new QueueLengthValue { QueueName = queueName, Length = 0, QueueReference = queueClient.GetQueueReference(queueName) }; queueLengths.AddOrUpdate(queueToTrack, _ => emptyQueueLength, (_, existingQueueLength) => existingQueueLength); }
public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack) { var sqlTable = SqlTable.Parse(queueToTrack.InputQueue, defaultSchema); tableNames.AddOrUpdate(queueToTrack, _ => sqlTable, (_, currentSqlTable) => { if (currentSqlTable.Equals(sqlTable) == false) { tableSizes.TryRemove(currentSqlTable, out var _); } return(sqlTable); }); tableSizes.TryAdd(sqlTable, 0); }
public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack) { var queue = QueueNameHelper.GetSqsQueueName(queueToTrack.InputQueue, queueNamePrefix); queues.AddOrUpdate(queueToTrack, _ => queue, (_, currentQueue) => { if (currentQueue != queue) { sizes.TryRemove(currentQueue, out var _); } return(queue); }); sizes.TryAdd(queue, 0); }
EndpointInputQueue ToEndpointInputQueue(EndpointToQueueMapping dto) { return(new EndpointInputQueue(dto.EndpointName, dto.InputQueue)); }
public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack) { }
static EndpointInputQueue ToQueueId(EndpointToQueueMapping endpointInputQueueDto) { return(new EndpointInputQueue(endpointInputQueueDto.EndpointName, endpointInputQueueDto.InputQueue)); }
public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack) { //This is a no op for MSMQ since the endpoints report their queue lenght to SC using custom messages }
public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack) { endpointsHash.AddOrUpdate(queueToTrack, queueToTrack, (_, __) => queueToTrack); }