Skip to content

Commit

Permalink
Extract method and update java doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaDemianenko committed May 15, 2017
1 parent 0d31a08 commit e9fffc5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
Expand Up @@ -56,7 +56,7 @@ <FAILURE extends Exception> StoreScan<FAILURE> visitNodes(

/**
* Produces {@link NodeUpdates} objects from reading node {@code nodeId}, its labels and properties
* and puts those updates into {@code target}.
* and puts those updates into node updates container.
*
* @param nodeId id of node to load.
* @return node updates container
Expand Down
Expand Up @@ -439,11 +439,7 @@ private void apply( Iterable<IndexEntryUpdate<LabelSchemaDescriptor>> updates, I
{
for ( IndexEntryUpdate<LabelSchemaDescriptor> indexUpdate : updates )
{
IndexUpdater updater = updaterMap.getUpdater( indexUpdate.indexKey().schema() );
if ( updater != null )
{
updater.process( indexUpdate );
}
processUpdate( updaterMap, indexUpdate );
}
}
}
Expand Down Expand Up @@ -543,18 +539,24 @@ private void applyRecoveredUpdates() throws IOException, IndexEntryConflictExcep
{
IndexEntryUpdate<LabelSchemaDescriptor> indexUpdate = indexEntryUpdates.next();
monitor.applyingRecoveredUpdate( indexUpdate );
IndexUpdater updater = updaterMap.getUpdater( indexUpdate.indexKey().schema() );
if ( updater != null )
{
updater.process( indexUpdate );
}
processUpdate( updaterMap, indexUpdate );
}
monitor.recoveredUpdatesApplied();
}
}
recoveredNodeIds.clear();
}

private void processUpdate( IndexUpdaterMap updaterMap, IndexEntryUpdate<LabelSchemaDescriptor> indexUpdate )
throws IOException, IndexEntryConflictException
{
IndexUpdater updater = updaterMap.getUpdater( indexUpdate.indexKey().schema() );
if ( updater != null )
{
updater.process( indexUpdate );
}
}

private Iterator<NodeUpdates> recoveredNodeUpdatesIterator()
{
PrimitiveLongIterator nodeIdIterator = recoveredNodeIds.iterator();
Expand Down

0 comments on commit e9fffc5

Please sign in to comment.