Compartilhar via


Método PipelineComponent.GetDependentInputs

Returns a collection of the input IDs of inputs that are waiting for more data, and thus are blocking the specified input.

Namespace:  Microsoft.SqlServer.Dts.Pipeline
Assembly:  Microsoft.SqlServer.PipelineHost (em Microsoft.SqlServer.PipelineHost.dll)

Sintaxe

'Declaração
Public Overridable Function GetDependentInputs ( _
    blockedInputID As Integer _
) As Collection(Of Integer)
'Uso
Dim instance As PipelineComponent 
Dim blockedInputID As Integer 
Dim returnValue As Collection(Of Integer)

returnValue = instance.GetDependentInputs(blockedInputID)
public virtual Collection<int> GetDependentInputs(
    int blockedInputID
)
public:
virtual Collection<int>^ GetDependentInputs(
    int blockedInputID
)
abstract GetDependentInputs : 
        blockedInputID:int -> Collection<int> 
override GetDependentInputs : 
        blockedInputID:int -> Collection<int> 
public function GetDependentInputs(
    blockedInputID : int
) : Collection<int>

Parâmetros

  • blockedInputID
    Tipo: System.Int32
    The ID of an input that is blocked while other inputs are waiting for more data.

Valor de retorno

Tipo: System.Collections.ObjectModel.Collection<Int32>
A collection of the input IDs of inputs that are waiting for more data, and thus are blocking the input that is identified by the blockedInputID parameter.

Comentários

When you set the value of the DtsPipelineComponentAttribute.SupportsBackPressure property to true in the DtsPipelineComponentAttribute, and your custom data flow component supports more than two inputs, then you must also provide an implementation for the GetDependentInputs method.

The data flow engine only calls the GetDependentInputs method when the user attaches more than two inputs to the component. When a component has only two inputs, and the IsInputReady method indicates that one input is blocked (canProcess = false), the data flow engine knows that the other input is waiting to receive more data. However, when there are more than two inputs, and the IsInputReady method indicates that one input is blocked, the extra code in the GetDependentInputs method identifies the inputs that are waiting to receive more data.

For more information about the handling of excessive memory usage if the inputs of a custom data flow component produce data at uneven rates, see Desenvolvendo componentes de fluxo de dados com várias entradas.

Exemplos

For a specific input that is blocked, the following implementation of the GetDependentInputs method returns a collection of the inputs that are waiting to receive more data, and thus are blocking the specified input. The component identifies the blocking inputs by checking for inputs other than the specified input that do not currently have data available to process in the buffers that the component has already received (inputBuffers[i].CurrentRow() == null). The GetDependentInputs method then returns the collection of blocking inputs as a collection of input IDs.

        public override Collection<int> GetDependentInputs(int blockedInputID)
        {
            Collection<int> currentDependencies = new Collection<int>();
            for (int i = 0; i < ComponentMetaData.InputCollection.Count; i++)
            {
                if (ComponentMetaData.InputCollection[i].ID != blockedInputID
                    && inputBuffers[i].CurrentRow() == null)
                {
                    currentDependencies.Add(ComponentMetaData.InputCollection[i].ID);
                }
            }
            
            return currentDependencies;
        }

Consulte também

Referência

PipelineComponent Classe

Namespace Microsoft.SqlServer.Dts.Pipeline