InstancePersistenceContext.CreateBindReclaimedLockException(Int64) 메서드

정의

TryCommand에서 throw되어 BindReclaimedLock 동작을 트리거할 수 있는 예외 인스턴스를 만듭니다.

public:
 Exception ^ CreateBindReclaimedLockException(long instanceVersion);
public Exception CreateBindReclaimedLockException(long instanceVersion);
member this.CreateBindReclaimedLockException : int64 -> Exception
Public Function CreateBindReclaimedLockException (instanceVersion As Long) As Exception

매개 변수

instanceVersion
Int64

인스턴스에 보관된 잠금의 버전이거나, 지속성 공급자가 잠금 버전을 구현하지 않는 경우 0입니다.

반품

예외입니다.

설명

샘플 코드:

protected override bool TryCommand(InstancePersistenceContext context, InstancePersistenceCommand command, TimeSpan timeout)
{
    throw context.CreateBindReclaimedLockException(5);
}

다음과 같습니다.

protected override bool TryCommand(InstancePersistenceContext context, InstancePersistenceCommand command, TimeSpan timeout)
{
    context.BindReclaimedLock(5, timeout);
    throw new OperationCanceledException();
}

적용 대상