public override bool VisitRelationshipCommand(Command.RelationshipCommand command)
        {
            _lockGroup.add(_lockService.acquireRelationshipLock(command.Key, Org.Neo4j.Kernel.impl.locking.LockService_LockType.WriteLock));

            UpdateStore(_neoStores.RelationshipStore, command);
            return(false);
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void readRelationshipCommandWithNonRequiredSecondaryUnit() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ReadRelationshipCommandWithNonRequiredSecondaryUnit()
        {
            InMemoryClosableChannel channel = new InMemoryClosableChannel();
            RelationshipRecord      before  = new RelationshipRecord(42, true, 1, 2, 3, 4, 5, 6, 7, true, true);

            before.RequiresSecondaryUnit = false;
            before.SecondaryUnitId       = 52;
            RelationshipRecord after = new RelationshipRecord(42, true, 1, 8, 3, 4, 5, 6, 7, true, true);

            (new Command.RelationshipCommand(before, after)).Serialize(channel);

            PhysicalLogCommandReaderV3_0 reader = new PhysicalLogCommandReaderV3_0();
            Command command = reader.Read(channel);

            assertTrue(command is Command.RelationshipCommand);

            Command.RelationshipCommand relationshipCommand = (Command.RelationshipCommand)command;
            assertEquals(before, relationshipCommand.Before);
            VerifySecondaryUnit(before, relationshipCommand.Before);
            assertEquals(after, relationshipCommand.After);
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldReadRelationshipCommand() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldReadRelationshipCommand()
        {
            // Given
            InMemoryClosableChannel channel = new InMemoryClosableChannel();
            RelationshipRecord      before  = new RelationshipRecord(42, -1, -1, -1);
            RelationshipRecord      after   = new RelationshipRecord(42, true, 1, 2, 3, 4, 5, 6, 7, true, true);

            (new Command.RelationshipCommand(before, after)).Serialize(channel);

            // When
            PhysicalLogCommandReaderV3_0 reader = new PhysicalLogCommandReaderV3_0();
            Command command = reader.Read(channel);

            assertTrue(command is Command.RelationshipCommand);

            Command.RelationshipCommand relationshipCommand = (Command.RelationshipCommand)command;

            // Then
            assertEquals(before, relationshipCommand.Before);
            assertEquals(after, relationshipCommand.After);
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void readRelationshipCommandWithFixedReferenceFormat302() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ReadRelationshipCommandWithFixedReferenceFormat302()
        {
            InMemoryClosableChannel channel = new InMemoryClosableChannel();
            RelationshipRecord      before  = new RelationshipRecord(42, true, 1, 2, 3, 4, 5, 6, 7, true, true);

            before.UseFixedReferences = true;
            RelationshipRecord after = new RelationshipRecord(42, true, 1, 8, 3, 4, 5, 6, 7, true, true);

            after.UseFixedReferences = true;
            (new Command.RelationshipCommand(before, after)).Serialize(channel);

            PhysicalLogCommandReaderV3_0_2 reader = new PhysicalLogCommandReaderV3_0_2();
            Command command = reader.Read(channel);

            assertTrue(command is Command.RelationshipCommand);

            Command.RelationshipCommand relationshipCommand = (Command.RelationshipCommand)command;
            assertEquals(before, relationshipCommand.Before);
            assertTrue(relationshipCommand.Before.UseFixedReferences);
            assertEquals(after, relationshipCommand.After);
            assertTrue(relationshipCommand.After.UseFixedReferences);
        }
Exemple #5
0
 public override bool VisitRelationshipCommand(Command.RelationshipCommand command)
 {
     return(IndexUpdatesExtractor.visitRelationshipCommand(command));
 }