private void InitializeInstanceFields()
 {
     _storeApplier = new NeoStoreBatchTransactionApplier(_neoStores, mock(typeof(CacheAccessBackDoor)), LockService.NO_LOCK_SERVICE);
     _labelScanStoreSynchronizer = new WorkSync <System.Func <LabelScanWriter>, LabelUpdateWork>(_labelScanStore);
     _indexUpdatesSync           = new WorkSync <IndexingUpdateService, IndexUpdatesWork>(_indexes);
     _indexApplier = new IndexBatchTransactionApplier(_indexes, _labelScanStoreSynchronizer, _indexUpdatesSync, mock(typeof(NodeStore)), _neoStores.RelationshipStore, _propertyStore, new IndexActivator(_indexes));
     _rule         = TestIndexDescriptorFactory.forLabel(_labelId, _propertyKey).withId(_id);
 }
Beispiel #2
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));
        }