public void Process(EndpointInstanceId endpointInstanceId, EndpointMetadataReport metadataReport) { var endpointInstanceQueue = new EndpointInputQueue(endpointInstanceId.EndpointName, metadataReport.LocalAddress); var queueName = metadataReport.LocalAddress; endpointQueues.AddOrUpdate(endpointInstanceQueue, _ => queueName, (_, currentValue) => { if (currentValue != queueName) { sizes.TryRemove(currentValue, out var _); } return(queueName); }); }
public void Process(EndpointInstanceId endpointInstanceId, EndpointMetadataReport metadataReport) { var endpointInputQueue = new EndpointInputQueue(endpointInstanceId.EndpointName, metadataReport.LocalAddress); var queueName = QueueNameSanitizer.Sanitize(metadataReport.LocalAddress); var queueClient = CloudStorageAccount.Parse(connectionString).CreateCloudQueueClient(); var emptyQueueLength = new QueueLengthValue { QueueName = queueName, Length = 0, QueueReference = queueClient.GetQueueReference(queueName) }; queueLengths.AddOrUpdate(endpointInputQueue, _ => emptyQueueLength, (_, existingQueueLength) => existingQueueLength); }
public void Process(EndpointInstanceId endpointInstanceId, EndpointMetadataReport metadataReport) { var endpointInputQueue = new EndpointInputQueue(endpointInstanceId.EndpointName, metadataReport.LocalAddress); var queue = QueueNameHelper.GetSqsQueueName(metadataReport.LocalAddress, queueNamePrefix); queues.AddOrUpdate(endpointInputQueue, _ => queue, (_, currentQueue) => { if (currentQueue != queue) { sizes.TryRemove(currentQueue, out var _); } return(queue); }); sizes.TryAdd(queue, 0); }
public void Process(EndpointInstanceId endpointInstanceId, EndpointMetadataReport metadataReport) { var endpointInputQueue = new EndpointInputQueue(endpointInstanceId.EndpointName, metadataReport.LocalAddress); var localAddress = metadataReport.LocalAddress; var sqlTable = SqlTable.Parse(localAddress, defaultSchema); tableNames.AddOrUpdate(endpointInputQueue, _ => sqlTable, (_, currentSqlTable) => { if (currentSqlTable.Equals(sqlTable) == false) { tableSizes.TryRemove(currentSqlTable, out var _); } return(sqlTable); }); tableSizes.TryAdd(sqlTable, 0); }
public void Process(EndpointInstanceId endpointInstanceId, TaggedLongValueOccurrence metricsReport) { var endpointInputQueue = new EndpointInputQueue(endpointInstanceId.EndpointName, metricsReport.TagValue); queueLengthStore.Store(metricsReport.Entries, endpointInputQueue); }
public void Process(EndpointInstanceId endpointInstanceId, EndpointMetadataReport metadataReport) { var key = new EndpointInputQueue(endpointInstanceId.EndpointName, metadataReport.LocalAddress); endpointsHash.AddOrUpdate(key, key, (_, __) => key); }