TransactedBatchingBehavior(Int32) 생성자

정의

지정된 일괄 처리 크기를 사용하여 클래스의 TransactedBatchingBehavior 새 인스턴스를 초기화합니다.

public:
 TransactedBatchingBehavior(int maxBatchSize);
public TransactedBatchingBehavior(int maxBatchSize);
new System.ServiceModel.Description.TransactedBatchingBehavior : int -> System.ServiceModel.Description.TransactedBatchingBehavior
Public Sub New (maxBatchSize As Integer)

매개 변수

maxBatchSize
Int32

함께 일괄 처리할 수 있는 최대 수신 작업 수입니다.

예외

MaxBatchSize 가 0보다 작습니다.

예제

다음 코드에서는 일괄 처리에서 처리할 최대 메시지 수를 지정하는 새 인스턴스 TransactedBatchingBehavior 를 만드는 방법을 보여 줍니다.

endpoint.Behaviors.Add(new TransactedBatchingBehavior(10));

설명

생성자에 전달된 값은 maxBatchSize 힌트일 뿐입니다. 에 도달하기 전에 모든 메시지가 수신될 수 있습니다 maxBatchSize. 이 경우 다른 메시지가 수신될 때까지 무기한 대기할 필요가 없습니다. 이러한 일이 발생하지 않도록 WCF는 일괄 처리를 일찍 커밋하고 새 일괄 처리를 열어 추가 메시지를 받습니다. 수신할 메시지가 없고 트랜잭션 제한 시간 값의 20%가 경과된 경우 일괄 처리가 커밋됩니다.

적용 대상