public override void Clear() { base.Initialize(false); this._entityId = -1; this._entityType = 0; this._prevProp = NO_PREVIOUS_PROPERTY.intValue(); this._nextProp = NO_NEXT_PROPERTY.intValue(); this._deletedRecords = null; this._blockRecordsCursor = _blocksCursor = 0; this._blocksLoaded = false; }
private NodeCommand Node(long nodeId) { NodeRecord after = new NodeRecord(nodeId, true, false, NO_NEXT_RELATIONSHIP.intValue(), NO_NEXT_PROPERTY.intValue(), 0); NodeLabelsField.parseLabelsField(after).add(1, null, null); return(new NodeCommand(new NodeRecord(nodeId), after)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldMarkRecordHeavyWhenSettingLabelFieldWithDynamicRecords() public virtual void ShouldMarkRecordHeavyWhenSettingLabelFieldWithDynamicRecords() { // GIVEN NodeRecord record = new NodeRecord(0, false, NO_NEXT_RELATIONSHIP.intValue(), NO_NEXT_PROPERTY.intValue()); // WHEN DynamicRecord dynamicRecord = new DynamicRecord(1); record.SetLabelField(0x8000000001L, asList(dynamicRecord)); // THEN assertFalse(record.Light); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldKeepRecordLightWhenSettingLabelFieldWithoutDynamicRecords() public virtual void ShouldKeepRecordLightWhenSettingLabelFieldWithoutDynamicRecords() { // GIVEN NodeRecord record = new NodeRecord(0, false, NO_NEXT_RELATIONSHIP.intValue(), NO_NEXT_PROPERTY.intValue()); // WHEN record.SetLabelField(0, Collections.emptyList()); // THEN assertTrue(record.Light); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldCombineProperFiveByteLabelField() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldCombineProperFiveByteLabelField() { // GIVEN // -- a store EphemeralFileSystemAbstraction fs = _efs.get(); _nodeStore = NewNodeStore(fs); // -- a record with the msb carrying a negative value long nodeId = 0; long labels = 0x8000000001L; NodeRecord record = new NodeRecord(nodeId, false, NO_NEXT_RELATIONSHIP.intValue(), NO_NEXT_PROPERTY.intValue()); record.InUse = true; record.SetLabelField(labels, Collections.emptyList()); _nodeStore.updateRecord(record); // WHEN // -- reading that record back NodeRecord readRecord = _nodeStore.getRecord(nodeId, _nodeStore.newRecord(), NORMAL); // THEN // -- the label field must be the same assertEquals(labels, readRecord.LabelField); }
public override void Clear() { Initialize(false, NO_NEXT_PROPERTY.intValue(), -1, -1, -1, 1, NO_NEXT_RELATIONSHIP.intValue(), 1, NO_NEXT_RELATIONSHIP.intValue(), true, true); }
public virtual void Delete(NodeRecord node) { node.InUse = false; Add(node, new NodeRecord(node.Id, false, NO_PREV_RELATIONSHIP.intValue(), NO_NEXT_PROPERTY.intValue())); }
public virtual void Create(NodeRecord node) { node.SetCreated(); Update(new NodeRecord(node.Id, false, NO_PREV_RELATIONSHIP.intValue(), NO_NEXT_PROPERTY.intValue()), node); }