Exemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public TransactionApplier startTx(org.neo4j.storageengine.api.CommandsToApply transaction, org.neo4j.kernel.impl.locking.LockGroup lockGroup) throws java.io.IOException
        public override TransactionApplier StartTx(CommandsToApply transaction, LockGroup lockGroup)
        {
            TransactionApplier[] txAppliers = new TransactionApplier[_appliers.Length];
            for (int i = 0; i < _appliers.Length; i++)
            {
                txAppliers[i] = _appliers[i].startTx(transaction, lockGroup);
            }
            return(new TransactionApplierFacade(txAppliers));
        }
Exemplo n.º 2
0
 public NeoStoreTransactionApplier(CommandVersion version, NeoStores neoStores, CacheAccessBackDoor cacheAccess, LockService lockService, long transactionId, LockGroup lockGroup)
 {
     this._version       = version;
     this._lockGroup     = lockGroup;
     this._transactionId = transactionId;
     this._lockService   = lockService;
     this._neoStores     = neoStores;
     this._cacheAccess   = cacheAccess;
 }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testStartTxCorrectOrderWithLockGroup() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void TestStartTxCorrectOrderWithLockGroup()
        {
            // GIVEN
            TransactionToApply tx        = mock(typeof(TransactionToApply));
            LockGroup          lockGroup = mock(typeof(LockGroup));

            // WHEN
            TransactionApplierFacade result = ( TransactionApplierFacade )_facade.startTx(tx, lockGroup);

            // THEN
            InOrder inOrder = inOrder(_applier1, _applier2, _applier3);

            inOrder.verify(_applier1).startTx(tx, lockGroup);
            inOrder.verify(_applier2).startTx(tx, lockGroup);
            inOrder.verify(_applier3).startTx(tx, lockGroup);

            assertEquals(_txApplier1, result.Appliers[0]);
            assertEquals(_txApplier2, result.Appliers[1]);
            assertEquals(_txApplier3, result.Appliers[2]);
            assertEquals(3, result.Appliers.Length);
        }
Exemplo n.º 4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public TransactionApplier startTx(org.neo4j.storageengine.api.CommandsToApply transaction, org.neo4j.kernel.impl.locking.LockGroup lockGroup) throws java.io.IOException
        public override TransactionApplier StartTx(CommandsToApply transaction, LockGroup lockGroup)
        {
            return(StartTx(transaction));
        }