//****************************************************************************************************** // IOutputAdapter.cs - Gbtc // // Copyright © 2012, Grid Protection Alliance. All Rights Reserved. // // Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See // the NOTICE file distributed with this work for additional information regarding copyright ownership. // The GPA licenses this file to you under the MIT License (MIT), the "License"; you may // not use this file except in compliance with the License. You may obtain a copy of the License at: // // http://www.opensource.org/licenses/MIT // // Unless agreed to in writing, the subject software distributed under the License is distributed on an // "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the // License for the specific language governing permissions and limitations. // // Code Modification History: // ---------------------------------------------------------------------------------------------------- // 09/02/2010 - J. Ritchie Carroll // Generated original version of source code. // 12/20/2012 - Starlynn Danyelle Gilliam // Modified Header. // //****************************************************************************************************** using System; using System.Collections.Generic; namespace GSF.TimeSeries.Adapters { /// /// Represents that abstract interface for any outgoing adapter. /// public interface IOutputAdapter : IAdapter { /// /// Event is raised every five seconds allowing host to track total number of unprocessed measurements. /// /// /// /// Implementations of this interface are expected to report current queue size of unprocessed /// measurements so that if queue size reaches an unhealthy threshold, host can take evasive action. /// /// /// is total number of unprocessed measurements. /// /// event EventHandler> UnprocessedMeasurements; /// /// Gets or sets values used to filter input measurements. /// /// /// This allows an adapter to associate itself with entire collections of measurements based on the source of the measurement keys. /// Set to null apply no filter. /// string[] InputSourceIDs { get; set; } /// /// Gets or sets input measurement keys that are requested by other adapters based on what adapter says it can provide. /// MeasurementKey[] RequestedInputMeasurementKeys { get; set; } /// /// Returns a flag that determines if measurements sent to this are /// destined for archival. /// /// /// This property allows the to calculate statistics on how /// many measurements have been archived per minute. Historians would normally set this property /// to true; other custom exports would set this property to false. /// bool OutputIsForArchive { get; } /// /// Queues measurements for processing. Measurements are automatically filtered to the defined . /// /// Collection of measurements to queue for processing. void QueueMeasurementsForProcessing(IEnumerable measurements); /// /// Implementations of this function should remove a range of measurements from the internal measurement queue. /// /// /// This method is typically only used to curtail size of measurement queue if it's getting too large. If more /// points are requested than there are points available - all points in the queue should be removed. /// void RemoveMeasurements(int total); } }