Skip to content

Commit

Permalink
Remove use of maxKeyCount from SeekCursorsTest
Browse files Browse the repository at this point in the history
And remove leafMaxKeyCount from TreeNode.

Also
Som other cleanups in SeekCursorTest
  • Loading branch information
burqen committed Jan 16, 2018
1 parent 43e66e4 commit cbfc8e4
Show file tree
Hide file tree
Showing 4 changed files with 264 additions and 327 deletions.
Expand Up @@ -261,8 +261,6 @@ static void writeChild( PageCursor cursor, long child, long stableGeneration, lo
GenerationSafePointerPair.assertSuccess( write );
}

abstract int leafMaxKeyCount();

// HELPERS

abstract boolean reasonableKeyCount( int keyCount );
Expand Down
Expand Up @@ -297,12 +297,6 @@ void setChildAt( PageCursor cursor, long child, int pos, long stableGeneration,
writeChild( cursor, child, stableGeneration, unstableGeneration );
}

@Override
int leafMaxKeyCount()
{
throw new UnsupportedOperationException( "Implement me" );
}

@Override
boolean reasonableKeyCount( int keyCount )
{
Expand Down
Expand Up @@ -183,12 +183,6 @@ void setChildAt( PageCursor cursor, long child, int pos, long stableGeneration,
writeChild( cursor, child, stableGeneration, unstableGeneration );
}

@Override
int leafMaxKeyCount()
{
return leafMaxKeyCount;
}

@Override
boolean reasonableKeyCount( int keyCount )
{
Expand Down Expand Up @@ -219,6 +213,11 @@ private void insertKeyAt( PageCursor cursor, KEY key, int pos, int keyCount )
layout.writeKey( cursor, key );
}

private int leafMaxKeyCount()
{
return leafMaxKeyCount;
}

private void removeKeyAt( PageCursor cursor, int pos, int keyCount )
{
removeSlotAt( cursor, pos, keyCount, keyOffset( 0 ), keySize );
Expand Down

0 comments on commit cbfc8e4

Please sign in to comment.