//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private org.neo4j.bolt.runtime.BoltStateMachineState processRollbackMessage(org.neo4j.bolt.runtime.StateMachineContext context) throws Exception
        private BoltStateMachineState ProcessRollbackMessage(StateMachineContext context)
        {
            StatementProcessor statementProcessor = context.ConnectionState().StatementProcessor;

            statementProcessor.RollbackTransaction();
            return(_readyState);
        }
Exemple #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private org.neo4j.bolt.runtime.BoltStateMachineState processBeginMessage(org.neo4j.bolt.v3.messaging.request.BeginMessage message, org.neo4j.bolt.runtime.StateMachineContext context) throws Exception
        private BoltStateMachineState ProcessBeginMessage(BeginMessage message, StateMachineContext context)
        {
            StatementProcessor statementProcessor = context.ConnectionState().StatementProcessor;

            statementProcessor.BeginTransaction(message.Bookmark(), message.TransactionTimeout(), message.TransactionMetadata());
            return(_txReadyState);
        }
Exemple #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.bolt.runtime.BoltStateMachineState process(org.neo4j.bolt.messaging.RequestMessage message, org.neo4j.bolt.runtime.StateMachineContext context) throws org.neo4j.bolt.runtime.BoltConnectionFatality
        public override BoltStateMachineState Process(RequestMessage message, StateMachineContext context)
        {
            AssertInitialized();
            if (message is InterruptSignal)
            {
                return(this);
            }
            else if (message is ResetMessage)
            {
                if (context.ConnectionState().decrementInterruptCounter() > 0)
                {
                    context.ConnectionState().markIgnored();
                    return(this);
                }

                if (context.ResetMachine())
                {
                    context.ConnectionState().resetPendingFailedAndIgnored();
                    return(_readyState);
                }
                return(_failedState);
            }
            else
            {
                context.ConnectionState().markIgnored();
                return(this);
            }
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private org.neo4j.bolt.runtime.BoltStateMachineState processCommitMessage(org.neo4j.bolt.runtime.StateMachineContext context) throws Exception
        private BoltStateMachineState ProcessCommitMessage(StateMachineContext context)
        {
            StatementProcessor statementProcessor = context.ConnectionState().StatementProcessor;
            Bookmark           bookmark           = statementProcessor.CommitTransaction();

            bookmark.AttachTo(context.ConnectionState());
            return(_readyState);
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private org.neo4j.bolt.runtime.BoltStateMachineState processRunMessage(org.neo4j.bolt.v3.messaging.request.RunMessage message, org.neo4j.bolt.runtime.StateMachineContext context) throws org.neo4j.internal.kernel.api.exceptions.KernelException
        private BoltStateMachineState ProcessRunMessage(RunMessage message, StateMachineContext context)
        {
            long start = context.Clock().millis();
            StatementProcessor statementProcessor = context.ConnectionState().StatementProcessor;
            StatementMetadata  statementMetadata  = statementProcessor.Run(message.Statement(), message.Params());
            long end = context.Clock().millis();

            context.ConnectionState().onMetadata(FIELDS_KEY, stringArray(statementMetadata.FieldNames()));
            context.ConnectionState().onMetadata(FIRST_RECORD_AVAILABLE_KEY, Values.longValue(end - start));
            return(_streamingState);
        }
Exemple #6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private org.neo4j.bolt.runtime.BoltStateMachineState processResetMessage(org.neo4j.bolt.runtime.StateMachineContext context) throws org.neo4j.bolt.runtime.BoltConnectionFatality
        private BoltStateMachineState ProcessResetMessage(StateMachineContext context)
        {
            bool success = context.ResetMachine();

            if (success)
            {
                context.ConnectionState().resetPendingFailedAndIgnored();
                return(_readyState);
            }
            return(this);
        }
Exemple #7
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.bolt.runtime.BoltStateMachineState processUnsafe(org.neo4j.bolt.messaging.RequestMessage message, org.neo4j.bolt.runtime.StateMachineContext context) throws Throwable
        public override BoltStateMachineState ProcessUnsafe(RequestMessage message, StateMachineContext context)
        {
            if (message is PullAllMessage)
            {
                return(ProcessStreamResultMessage(true, context));
            }
            if (message is DiscardAllMessage)
            {
                return(ProcessStreamResultMessage(false, context));
            }
            return(null);
        }
Exemple #8
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.bolt.runtime.BoltStateMachineState processUnsafe(org.neo4j.bolt.messaging.RequestMessage message, org.neo4j.bolt.runtime.StateMachineContext context) throws Exception
        public override BoltStateMachineState ProcessUnsafe(RequestMessage message, StateMachineContext context)
        {
            if (message is RunMessage)
            {
                return(ProcessRunMessage(( RunMessage )message, context));
            }
            if (message is BeginMessage)
            {
                return(ProcessBeginMessage(( BeginMessage )message, context));
            }
            return(null);
        }
Exemple #9
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.bolt.runtime.BoltStateMachineState process(org.neo4j.bolt.messaging.RequestMessage message, org.neo4j.bolt.runtime.StateMachineContext context) throws org.neo4j.bolt.runtime.BoltConnectionFatality
        public override BoltStateMachineState Process(RequestMessage message, StateMachineContext context)
        {
            AssertInitialized();
            if (ShouldIgnore(message))
            {
                context.ConnectionState().markIgnored();
                return(this);
            }
            if (message is InterruptSignal)
            {
                return(_interruptedState);
            }
            return(null);
        }
Exemple #10
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.bolt.runtime.BoltStateMachineState process(org.neo4j.bolt.messaging.RequestMessage message, org.neo4j.bolt.runtime.StateMachineContext context) throws org.neo4j.bolt.runtime.BoltConnectionFatality
        public override BoltStateMachineState Process(RequestMessage message, StateMachineContext context)
        {
            AssertInitialized();
            if (ShouldIgnore(message))
            {
                context.ConnectionState().markIgnored();
                return(this);
            }
            if (message is AckFailureMessage)
            {
                context.ConnectionState().resetPendingFailedAndIgnored();
                return(_readyState);
            }
            if (message is ResetMessage)
            {
                return(ProcessResetMessage(context));
            }
            if (message is InterruptSignal)
            {
                return(_interruptedState);
            }
            return(null);
        }
Exemple #11
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: abstract org.neo4j.bolt.runtime.BoltStateMachineState processStreamResultMessage(boolean pull, org.neo4j.bolt.runtime.StateMachineContext context) throws Throwable;
        internal abstract BoltStateMachineState ProcessStreamResultMessage(bool pull, StateMachineContext context);
Exemple #12
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: protected org.neo4j.bolt.runtime.BoltStateMachineState processStreamResultMessage(boolean pull, org.neo4j.bolt.runtime.StateMachineContext context) throws Throwable
        protected internal override BoltStateMachineState ProcessStreamResultMessage(bool pull, StateMachineContext context)
        {
            context.ConnectionState().StatementProcessor.streamResult(recordStream => context.ConnectionState().ResponseHandler.onRecords(recordStream, pull));
            return(ReadyStateConflict);
        }