protected override LockTransactionResult DoExecuteLockTransaction(LockSession session, LockTransaction transaction) { return(Contracts.ServiceClientHub.CallWithRetry <Contracts.ILockerClient, LockTransactionResult> ( (locker) => locker.ExecuteLockTransaction(session.Data, transaction), session.ServerHosts )); }
protected override Task <LockTransactionResult> DoExecuteLockTransactionAsync(LockSession session, LockTransaction transaction) { return(Contracts.ServiceClientHub.CallWithRetryAsync <Contracts.ILockerClient, LockTransactionResult> ( (locker) => locker.Async_ExecuteLockTransaction(session.Data, transaction).AsTaskReturning <LockTransactionResult>(), session.ServerHosts )); }
protected abstract LockTransactionResult DoExecuteLockTransaction(LockSession session, LockTransaction transaction);
protected abstract Task <LockTransactionResult> DoExecuteLockTransactionAsync(LockSession session, LockTransaction transaction);
public Task <LockTransactionResult> ExecuteLockTransactionAsync(LockSession session, LockTransaction transaction) { if (!Running) { return(Task.FromResult(LockTransactionResult.CallFailed)); } if (session == null || transaction == null) { throw new LockingException(StringConsts.ARGUMENT_ERROR + GetType().Name + ".ExecuteLockTransactionAsync(session|tran==null)"); } checkSessionExists(session); if (m_InstrumentationEnabled) { m_Stats.IncrementLong(session.Path); } return(DoExecuteLockTransactionAsync(session, transaction)); }
protected override Task <LockTransactionResult> DoExecuteLockTransactionAsync(LockSession session, LockTransaction transaction) { return(TaskUtils.AsCompletedTask(() => m_Server.ExecuteLockTransaction(session.Data, transaction))); }
protected override LockTransactionResult DoExecuteLockTransaction(LockSession session, LockTransaction transaction) { return(m_Server.ExecuteLockTransaction(session.Data, transaction)); }
public Task <LockTransactionResult> ExecuteLockTransactionAsync(LockSession session, LockTransaction transaction) { return(Task.FromResult(ExecuteLockTransaction(session, transaction))); }
public LockTransactionResult ExecuteLockTransaction(LockSession session, LockTransaction transaction) { return(new LockTransactionResult(Guid.Empty, null, LockStatus.TransactionOK, LockErrorCause.Unspecified, null, 0, 0d, null)); }