Skip to content

Commit

Permalink
Renames oddly named visitable interface
Browse files Browse the repository at this point in the history
  • Loading branch information
tinwelint committed Jan 8, 2016
1 parent 545547f commit 21e1398
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
Expand Up @@ -33,9 +33,9 @@
*/
public class MemoryUsageStatsProvider extends GenericStatsProvider implements Stat
{
private final MemoryStatsVisitor.Home[] users;
private final MemoryStatsVisitor.Visitable[] users;

public MemoryUsageStatsProvider( MemoryStatsVisitor.Home... users )
public MemoryUsageStatsProvider( MemoryStatsVisitor.Visitable... users )
{
this.users = users;
add( Keys.memory_usage, this );
Expand All @@ -51,7 +51,7 @@ public DetailLevel detailLevel()
public long asLong()
{
GatheringMemoryStatsVisitor visitor = new GatheringMemoryStatsVisitor();
for ( MemoryStatsVisitor.Home user : users )
for ( MemoryStatsVisitor.Visitable user : users )
{
user.acceptMemoryStatsVisitor( visitor );
}
Expand Down
Expand Up @@ -24,7 +24,7 @@
*/
public interface MemoryStatsVisitor
{
interface Home
interface Visitable
{
void acceptMemoryStatsVisitor( MemoryStatsVisitor visitor );
}
Expand Down
Expand Up @@ -30,7 +30,7 @@
* Caches labels for each node. Tries to keep memory as 8b (a long) per node. If a particular node has many labels
* it will spill over into two or more longs in a separate array.
*/
public class NodeLabelsCache implements MemoryStatsVisitor.Home
public class NodeLabelsCache implements MemoryStatsVisitor.Visitable
{
public static class Client
{
Expand Down
Expand Up @@ -27,7 +27,7 @@
* Caches of parts of node store and relationship group store. A crucial part of batch import where
* any random access must be covered by this cache. All I/O, both read and write must be sequential.
*/
public class NodeRelationshipCache implements MemoryStatsVisitor.Home
public class NodeRelationshipCache implements MemoryStatsVisitor.Visitable
{
private static final long EMPTY = -1;

Expand Down Expand Up @@ -181,7 +181,7 @@ public long visit( long nodeId, int type, long next, long out, long in, long loo
}
};

private static class RelGroupCache implements AutoCloseable, MemoryStatsVisitor.Home
private static class RelGroupCache implements AutoCloseable, MemoryStatsVisitor.Visitable
{
private static final int ENTRY_SIZE = 4;

Expand Down
Expand Up @@ -24,7 +24,7 @@
*
* @see NumberArrayFactory
*/
public interface NumberArray extends MemoryStatsVisitor.Home, AutoCloseable
public interface NumberArray extends MemoryStatsVisitor.Visitable, AutoCloseable
{
/**
* @return length of the array, i.e. the capacity.
Expand Down
Expand Up @@ -31,7 +31,7 @@
* Maps node ids as specified by {@link InputNode#id()}, {@link InputRelationship#startNode()} and
* {@link InputRelationship#endNode()} from an id of some unknown sort, coming directly from input, to actual node ids.
*/
public interface IdMapper extends MemoryStatsVisitor.Home
public interface IdMapper extends MemoryStatsVisitor.Visitable
{
/**
* Maps an {@code inputId} to an actual node id.
Expand Down
Expand Up @@ -797,7 +797,7 @@ public void acceptMemoryStatsVisitor( MemoryStatsVisitor visitor )
// TODO mention anything about the collisionValues data structure?
}

private void nullSafeAcceptMemoryStatsVisitor( MemoryStatsVisitor visitor, MemoryStatsVisitor.Home mem )
private void nullSafeAcceptMemoryStatsVisitor( MemoryStatsVisitor visitor, MemoryStatsVisitor.Visitable mem )
{
if ( mem != null )
{
Expand Down
Expand Up @@ -39,7 +39,7 @@
* a smaller data structure for smaller datasets, for example those that fit inside {@code int} range.
* That's why this abstraction exists so that the best suited implementation can be picked for every import.
*/
public interface Tracker extends MemoryStatsVisitor.Home
public interface Tracker extends MemoryStatsVisitor.Visitable
{
/**
* @param index data index to get the value for.
Expand Down

0 comments on commit 21e1398

Please sign in to comment.