PipelineComponent.GetDependentInputs(Int32) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
追加データを待っている入力の入力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です。
返品
さらなるデータを待っている入力の入力IDの集合であり、そのため blockedInputID パラメータで識別される入力をブロックしています。
例
ブロックされた特定の入力に対して、以下の 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;
}
注釈
DtsPipelineComponentAttributeでMicrosoft.SqlServer.Dts.Pipeline.DtsPipelineComponentAttribute.SupportsBackPressureプロパティの値をtrueに設定し、カスタムデータフローコンポーネントが2つ以上の入力をサポートしている場合、GetDependentInputsメソッドの実装も提供する必要があります。
データフローエンジンは、ユーザーがコンポーネントに2つ以上の入力を接続した場合にのみ GetDependentInputs メソッドを呼び出します。 コンポーネントが入力が2つしかなく、 IsInputReady メソッドが1つの入力がブロックされている(canProcess = false)を示す場合、データフローエンジンはもう一方の入力がさらなるデータを受け取るのを待っていることを認識します。 しかし、入力が2つ以上あり、 IsInputReady メソッドが1つの入力がブロックされていると示す場合、 GetDependentInputs メソッドの追加コードが、さらに多くのデータを受信するのを待っている入力を特定します。
カスタムdata flowコンポーネントの入力が不均一な速度でデータを生成した場合の過剰なメモリ使用の処理については、「複数入力を持つData Flowコンポーネントの開発」を参照してください。