PipelineComponent.GetDependentInputs(Int32) メソッド

定義

追加のデータを待っているために特定の入力をブロックしている入力の入力 ID のコレクションを返します。

public:
 virtual System::Collections::ObjectModel::Collection<int> ^ GetDependentInputs(int blockedInputID);
public virtual System.Collections.ObjectModel.Collection<int> GetDependentInputs (int blockedInputID);
abstract member GetDependentInputs : int -> System.Collections.ObjectModel.Collection<int>
override this.GetDependentInputs : int -> System.Collections.ObjectModel.Collection<int>
Public Overridable Function GetDependentInputs (blockedInputID As Integer) As Collection(Of Integer)

パラメーター

blockedInputID
Int32

他の入力がデータを待っている間にブロックされた入力の ID です。

戻り値

追加のデータを待っているために blockedInputID パラメーターで識別された入力をブロックしている入力の入力 ID のコレクションです。

ブロックされている特定の入力に対し、GetDependentInputs メソッドの次の実装は、追加のデータを待っているために特定の入力をブロックしている入力のコレクションを返します。 コンポーネントは、指定された入力以外の、受信済みのバッファーで処理できるデータを現在持たない入力 (inputBuffers[i].CurrentRow() == null) をチェックすることによって、ブロックしている入力を識別します。 次に、GetDependentInputs メソッドは、ブロックしている入力のコレクションを入力 ID のコレクションとして返します。

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;  
}  

注釈

Microsoft.SqlServer.Dts.Pipeline.DtsPipelineComponentAttribute.SupportsBackPressureDtsPipelineComponentAttribute プロパティの値を true に設定したときにカスタム データ フロー コンポーネントが 3 つ以上の入力をサポートしている場合は、GetDependentInputs メソッドも実装する必要があります。

データ フロー エンジンは、ユーザーが 3 つ以上の入力をコンポーネントにアタッチする場合に、GetDependentInputs メソッドを呼び出すだけです。 コンポーネントに 2 つの入力のみが含まれており、メソッドが IsInputReady 1 つの入力がブロック ()canProcess = false されていることを示す場合、データ フロー エンジンは、もう一方の入力がより多くのデータの受信を待機していることを認識します。 ただし、3 つ以上の入力があるときに 1 つの入力がブロックされていることが IsInputReady メソッドによって示される場合、GetDependentInputs メソッドの追加のコードにより、追加のデータを待っている入力を識別できます。

カスタム データ フロー コンポーネントの入力が不均等なレートでデータを生成する場合の過剰なメモリ使用量の処理の詳細については、「複数の入力を含むData Flow コンポーネントの開発」を参照してください。

適用対象