private void invalidateNode(long nodeId, long relIdDeleted, long nextRelId) { NodeImpl node = nodeCache.getIfCached(nodeId); if (node != null) { RelationshipLoadingPosition position = node.getRelChainPosition(); if (position != null) { position.compareAndAdvance(relIdDeleted, nextRelId); } } }
public void apply(Collection<NodeLabelUpdate> updates) { for (NodeLabelUpdate update : updates) { NodeImpl node = nodeCache.getIfCached(update.getNodeId()); if (node != null) { // TODO: This is because the labels are still longs in WriteTransaction, this should go away // once // we make labels be ints everywhere. long[] labelsAfter = update.getLabelsAfter(); int[] labels = new int[labelsAfter.length]; for (int i = 0; i < labels.length; i++) { labels[i] = (int) labelsAfter[i]; } node.commitLabels(labels); } } }