Beispiel #1
0
        /// <summary>
        /// Queues a transaction for application.
        /// </summary>
        /// <param name="tx"> The transaction to be queued for application. </param>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void queue(org.neo4j.kernel.impl.transaction.CommittedTransactionRepresentation tx) throws Exception
        public virtual void Queue(CommittedTransactionRepresentation tx)
        {
            long receivedTxId = tx.CommitEntry.TxId;
            long expectedTxId = _lastQueuedTxId + 1;

            if (receivedTxId != expectedTxId)
            {
                _log.warn("Out of order transaction. Received: %d Expected: %d", receivedTxId, expectedTxId);
                return;
            }

            _txQueue.queue(new TransactionToApply(tx.TransactionRepresentation, receivedTxId, _versionContextSupplier.VersionContext));

            if (!_stopped)
            {
                _lastQueuedTxId = receivedTxId;
                _monitor.txPullResponse(receivedTxId);
            }
        }