Ejemplo n.º 1
0
        private void AllocateFreeAndAssertNotReused(PageSwapper swapper, MutableIntSet ids, int i)
        {
            int id = _set.allocate(swapper);

            _set.free(id);
            if (!ids.add(id))
            {
                fail("Expected ids.add( id ) to return true for id " + id + " in iteration " + i + " but it instead returned false");
            }
        }
Ejemplo n.º 2
0
 public override void CheckReference(RECORD record, PropertyRecord property, CheckerEngine <RECORD, REPORT> engine, RecordAccess records)
 {
     foreach (int key in Keys(property))
     {
         if (!_keys.add(key))
         {
             engine.Report().propertyKeyNotUniqueInChain();
         }
     }
     if (!Record.NO_NEXT_PROPERTY.@is(property.NextProp))
     {
         engine.ComparativeCheck(records.Property(property.NextProp), this);
     }
 }
 /// <summary>
 /// Store all types that was added in the transaction for the current node
 /// </summary>
 private void CheckTxStateForUpdates()
 {
     if (_read.hasTxStateWithChanges())
     {
         NodeState    nodeState          = _read.txState().getNodeState(_storeCursor.OwningNode);
         LongIterator addedRelationships = nodeState.AddedRelationships;
         while (addedRelationships.hasNext())
         {
             RelationshipState relationshipState = _read.txState().getRelationshipState(addedRelationships.next());
             relationshipState.Accept((relationshipId, typeId, startNodeId, endNodeId) => _txTypes.add(typeId));
         }
     }
 }
Ejemplo n.º 4
0
        private void AllocateAndAdd(MutableIntSet allocated, PageSwapper swapper)
        {
            int id = _set.allocate(swapper);

            allocated.add(id);
        }