Skip to content

Commit

Permalink
Rename Progression to NodeProgression
Browse files Browse the repository at this point in the history
  • Loading branch information
davidegrohmann committed May 8, 2017
1 parent 2939c98 commit 553441a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
Expand Up @@ -22,7 +22,7 @@
import org.neo4j.kernel.api.StatementConstants;
import org.neo4j.kernel.impl.store.NodeStore;

public class AllNodeProgression implements Progression
public class AllNodeProgression implements NodeProgression
{
private final AllIdIterator allIdIterator;

Expand Down
Expand Up @@ -40,8 +40,8 @@
import org.neo4j.storageengine.api.txstate.ReadableTransactionState;

import static org.neo4j.collection.primitive.PrimitiveIntCollections.asSet;
import static org.neo4j.kernel.impl.api.store.Progression.Mode.APPEND;
import static org.neo4j.kernel.impl.api.store.Progression.Mode.FETCH;
import static org.neo4j.kernel.impl.api.store.NodeProgression.Mode.APPEND;
import static org.neo4j.kernel.impl.api.store.NodeProgression.Mode.FETCH;
import static org.neo4j.kernel.impl.locking.LockService.NO_LOCK;
import static org.neo4j.kernel.impl.locking.LockService.NO_LOCK_SERVICE;
import static org.neo4j.kernel.impl.store.record.RecordLoad.CHECK;
Expand All @@ -54,7 +54,7 @@ public class NodeCursor implements NodeItem, Cursor<NodeItem>, Disposable
private final NodeStore nodeStore;
private final LockService lockService;

private Progression progression;
private NodeProgression progression;
private ReadableTransactionState state;
private boolean fetched;
private long[] labels;
Expand All @@ -71,7 +71,7 @@ public class NodeCursor implements NodeItem, Cursor<NodeItem>, Disposable
this.lockService = lockService;
}

public Cursor<NodeItem> init( Progression progression, ReadableTransactionState state )
public Cursor<NodeItem> init( NodeProgression progression, ReadableTransactionState state )
{
this.progression = progression;
this.state = state;
Expand Down
Expand Up @@ -19,7 +19,7 @@
*/
package org.neo4j.kernel.impl.api.store;

public interface Progression
public interface NodeProgression
{
enum Mode
{
Expand Down
Expand Up @@ -21,7 +21,7 @@

import org.neo4j.kernel.api.StatementConstants;

public class SingleNodeProgression implements Progression
public class SingleNodeProgression implements NodeProgression
{
private long nodeId;

Expand Down
Expand Up @@ -38,7 +38,7 @@
import org.neo4j.io.pagecache.PageCursor;
import org.neo4j.kernel.api.StatementConstants;
import org.neo4j.kernel.impl.api.state.TxState;
import org.neo4j.kernel.impl.api.store.Progression.Mode;
import org.neo4j.kernel.impl.api.store.NodeProgression.Mode;
import org.neo4j.kernel.impl.locking.Lock;
import org.neo4j.kernel.impl.store.NodeStore;
import org.neo4j.kernel.impl.store.record.NodeRecord;
Expand All @@ -57,8 +57,8 @@
import static org.mockito.Mockito.when;
import static org.neo4j.collection.primitive.PrimitiveIntCollections.asArray;
import static org.neo4j.collection.primitive.PrimitiveIntCollections.asSet;
import static org.neo4j.kernel.impl.api.store.Progression.Mode.APPEND;
import static org.neo4j.kernel.impl.api.store.Progression.Mode.FETCH;
import static org.neo4j.kernel.impl.api.store.NodeProgression.Mode.APPEND;
import static org.neo4j.kernel.impl.api.store.NodeProgression.Mode.FETCH;
import static org.neo4j.kernel.impl.locking.LockService.NO_LOCK_SERVICE;
import static org.neo4j.kernel.impl.store.record.RecordLoad.CHECK;
import static org.neo4j.kernel.impl.transaction.state.NodeLabelsFieldTest.inlinedLabelsLongRepresentation;
Expand Down Expand Up @@ -223,7 +223,7 @@ public void shouldCallTheConsumerOnClose()
MutableBoolean called = new MutableBoolean();
NodeCursor cursor =
new NodeCursor( nodeRecord, c -> called.setTrue(), nodeStore, NO_LOCK_SERVICE );
cursor.init( mock( Progression.class ), mock( ReadableTransactionState.class ) );
cursor.init( mock( NodeProgression.class ), mock( ReadableTransactionState.class ) );
assertFalse( called.booleanValue() );

cursor.close();
Expand All @@ -235,7 +235,7 @@ public void shouldCloseThePageCursorWhenDisposed()
{
NodeCursor cursor =
new NodeCursor( nodeRecord, c -> {}, nodeStore, NO_LOCK_SERVICE );
cursor.init( mock( Progression.class ), mock( ReadableTransactionState.class ) );
cursor.init( mock( NodeProgression.class ), mock( ReadableTransactionState.class ) );

cursor.close();
cursor.dispose();
Expand Down Expand Up @@ -535,9 +535,9 @@ Cursor<NodeItem> initialize( NodeCursor cursor, NodeStore nodeStore, PageCursor
return cursor.init( createProgression( ops, mode ), state );
}

private Progression createProgression( Operation[] ops, Mode mode )
private NodeProgression createProgression( Operation[] ops, Mode mode )
{
return new Progression()
return new NodeProgression()
{
private int i = 0;

Expand Down

0 comments on commit 553441a

Please sign in to comment.