Пример #1
0
 public LockTransactionResult ExecuteLockTransaction(LockSession session, LockTransaction transaction)
 {
     return(new LockTransactionResult(Guid.Empty, null, LockStatus.TransactionOK, LockErrorCause.Unspecified, null, 0, 0d, null));
 }
Пример #2
0
 public Task <LockTransactionResult> ExecuteLockTransactionAsync(LockSession session, LockTransaction transaction)
 {
     return(Task.FromResult(ExecuteLockTransaction(session, transaction)));
 }
Пример #3
0
 protected override LockTransactionResult DoExecuteLockTransaction(LockSession session, LockTransaction transaction)
 {
     return(m_Server.ExecuteLockTransaction(session.Data, transaction));
 }
Пример #4
0
 protected override Task <LockTransactionResult> DoExecuteLockTransactionAsync(LockSession session, LockTransaction transaction)
 {
     return(TaskUtils.AsCompletedTask(() => m_Server.ExecuteLockTransaction(session.Data, transaction)));
 }
Пример #5
0
 protected abstract Task <LockTransactionResult> DoExecuteLockTransactionAsync(LockSession session, LockTransaction transaction);
Пример #6
0
 protected abstract LockTransactionResult DoExecuteLockTransaction(LockSession session, LockTransaction transaction);
Пример #7
0
        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));
        }
Пример #8
0
 protected override Task <LockTransactionResult> DoExecuteLockTransactionAsync(LockSession session, LockTransaction transaction)
 {
     return(App.GetServiceClientHub().CallWithRetryAsync <Contracts.ILockerClient, LockTransactionResult>
            (
                (locker) => locker.Async_ExecuteLockTransaction(session.Data, transaction).AsTaskReturning <LockTransactionResult>(),
                session.ServerHosts
            ));
 }
Пример #9
0
 protected override LockTransactionResult DoExecuteLockTransaction(LockSession session, LockTransaction transaction)
 {
     return(App.GetServiceClientHub().CallWithRetry <Contracts.ILockerClient, LockTransactionResult>
            (
                (locker) => locker.ExecuteLockTransaction(session.Data, transaction),
                session.ServerHosts
            ));
 }