Exemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: protected void extractTransactions(long startingAtTransactionId, org.neo4j.helpers.collection.Visitor<org.neo4j.kernel.impl.transaction.CommittedTransactionRepresentation,Exception> visitor) throws Exception
        protected internal virtual void ExtractTransactions(long startingAtTransactionId, Visitor <CommittedTransactionRepresentation, Exception> visitor)
        {
            using (IOCursor <CommittedTransactionRepresentation> cursor = TransactionStore.getTransactions(startingAtTransactionId))
            {
                while (cursor.next() && !visitor.Visit(cursor.get()))
                {
                }
            }
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldHaveFixedTargetTransactionIdEvenIfLastTransactionIdIsMoving() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldHaveFixedTargetTransactionIdEvenIfLastTransactionIdIsMoving()
        {
            // GIVEN
            LogicalTransactionStore transactionStore = mock(typeof(LogicalTransactionStore));
            long lastAppliedTransactionId            = 5L;
            TransactionCursor endlessCursor          = new EndlessCursor(this, lastAppliedTransactionId + 1);

            when(transactionStore.getTransactions(anyLong())).thenReturn(endlessCursor);
            const long targetTransactionId = 8L;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.kernel.impl.transaction.log.TransactionIdStore transactionIdStore = new org.neo4j.kernel.impl.transaction.SimpleTransactionIdStore(targetTransactionId, 0, BASE_TX_COMMIT_TIMESTAMP, 0, 0);
            TransactionIdStore transactionIdStore = new SimpleTransactionIdStore(targetTransactionId, 0, BASE_TX_COMMIT_TIMESTAMP, 0, 0);
            ResponsePacker     packer             = new ResponsePacker(transactionStore, transactionIdStore, Suppliers.singleton(StoreIdTestFactory.newStoreIdForCurrentVersion()));

            // WHEN
            Response <object> response = packer.PackTransactionStreamResponse(RequestContextStartingAt(5L), null);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final java.util.concurrent.atomic.AtomicLong nextExpectedVisit = new java.util.concurrent.atomic.AtomicLong(lastAppliedTransactionId);
            AtomicLong nextExpectedVisit = new AtomicLong(lastAppliedTransactionId);

            response.Accept(new HandlerAnonymousInnerClass(this, targetTransactionId, transactionIdStore, nextExpectedVisit));
        }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public TransactionCursor getTransactions(long transactionIdToStartFrom) throws java.io.IOException
        public override TransactionCursor GetTransactions(long transactionIdToStartFrom)
        {
            return(_physicalStore.getTransactions(transactionIdToStartFrom));
        }