Esempio n. 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void applyExternalTransaction(long transactionId, org.neo4j.kernel.impl.transaction.command.Command...commands) throws Exception
        private void ApplyExternalTransaction(long transactionId, params Command[] commands)
        {
            LockService lockService = mock(typeof(LockService));

            when(lockService.AcquireNodeLock(anyLong(), any(typeof(Org.Neo4j.Kernel.impl.locking.LockService_LockType)))).thenReturn(LockService.NO_LOCK);
            when(lockService.AcquireRelationshipLock(anyLong(), any(typeof(Org.Neo4j.Kernel.impl.locking.LockService_LockType)))).thenReturn(LockService.NO_LOCK);
            NeoStoreBatchTransactionApplier applier = new NeoStoreBatchTransactionApplier(_neoStores, mock(typeof(CacheAccessBackDoor)), lockService);
            TransactionRepresentation       tx      = new PhysicalTransactionRepresentation(Arrays.asList(commands));

            CommandHandlerContract.apply(applier, txApplier =>
            {
                tx.Accept(txApplier);
                return(false);
            }, new TransactionToApply(tx, transactionId));
        }
Esempio n. 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void visitSchemaRuleCommand(org.neo4j.kernel.impl.api.BatchTransactionApplier applier, org.neo4j.kernel.impl.transaction.command.Command.SchemaRuleCommand command) throws Exception
        private void VisitSchemaRuleCommand(BatchTransactionApplier applier, Command.SchemaRuleCommand command)
        {
            TransactionToApply tx = new TransactionToApply(new PhysicalTransactionRepresentation(singletonList(command)), _txId);

            CommandHandlerContract.apply(applier, tx);
        }