diff --git a/community/consistency-check/src/main/java/org/neo4j/consistency/statistics/AccessStatsKeepingStoreAccess.java b/community/consistency-check/src/main/java/org/neo4j/consistency/statistics/AccessStatsKeepingStoreAccess.java index 6fe91ae0a085d..cf204761c3632 100644 --- a/community/consistency-check/src/main/java/org/neo4j/consistency/statistics/AccessStatsKeepingStoreAccess.java +++ b/community/consistency-check/src/main/java/org/neo4j/consistency/statistics/AccessStatsKeepingStoreAccess.java @@ -44,7 +44,7 @@ protected RecordStore wrapStore( RecordStore( store, accessStats ); } private static class AccessStatsKeepingRecordStore @@ -58,11 +58,6 @@ private static class AccessStatsKeepingRecordStore extends Cursor */ boolean next( long id ); - /** - * An additional way of placing this cursor at an arbitrary record id. - * Calling this method will not advance the "current id" as to change which {@link #next()} will load next. - * This method is useful when there's an opportunity to load a record from an already acquired - * {@link PageCursor} and potentially even an already pinned page. - * - * @param id record id to place cursor at. - * @param record record to load the record data into. - * @param mode {@link RecordLoad} mode temporarily overriding the default provided in - * {@link #acquire(long, RecordLoad)}. - * @return whether or not that record is in use. - */ - boolean next( long id, R record, RecordLoad mode ); - /** * Read all records in the chain starting from the id this cursor is positioned at using either * {@link #acquire(long, RecordLoad)} or {@link #placeAt(long, RecordLoad)}. Each next record in the chain is @@ -155,11 +141,5 @@ public boolean next( long id ) { return actual.next( id ); } - - @Override - public boolean next( long id, R record, RecordLoad mode ) - { - return actual.next( id, record, mode ); - } } } diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/store/StoreRecordCursor.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/store/StoreRecordCursor.java index 0688cf9d2e8f1..57906850dae4d 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/store/StoreRecordCursor.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/store/StoreRecordCursor.java @@ -47,7 +47,7 @@ public boolean next() { try { - return next( currentId, record, mode ); + return next( currentId ); } finally { @@ -62,12 +62,6 @@ public boolean next() @Override public boolean next( long id ) - { - return next( id, record, mode ); - } - - @Override - public boolean next( long id, RECORD record, RecordLoad mode ) { assert pageCursor != null : "Not initialized"; if ( NULL_REFERENCE.is( id ) ) diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/store/CommonAbstractStoreBehaviourTest.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/store/CommonAbstractStoreBehaviourTest.java index 322ad1d2b5636..ace891b3c937b 100644 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/store/CommonAbstractStoreBehaviourTest.java +++ b/community/kernel/src/test/java/org/neo4j/kernel/impl/store/CommonAbstractStoreBehaviourTest.java @@ -257,7 +257,7 @@ public void pageCursorErrorsMustNotLingerInRecordCursor() throws Exception // This will encounter a decoding error, which is ignored because FORCE assertTrue( cursor.next() ); // Then this should not fail because of the previous decoding error, even though we stay on the same page - assertTrue( cursor.next( 2, new IntRecord( 2 ), NORMAL ) ); + assertTrue( cursor.next( 2 ) ); } @Test @@ -277,10 +277,6 @@ public void shouldReadTheCorrectRecordWhenGivenAnExplicitIdAndNotUseTheCurrentId assertTrue( cursor.next( 43 ) ); assertEquals( record43, cursor.get() ); - IntRecord record = new IntRecord( -1 ); - assertTrue( cursor.next( 43, record, NORMAL ) ); - assertEquals( record43, record ); - // next with id does not affect the old pointer either, so 42 is read now assertTrue( cursor.next() ); assertEquals( record42, cursor.get() ); @@ -305,10 +301,6 @@ public void shouldJumpAroundPageIds() throws Exception assertTrue( cursor.next( idOnAnotherPage ) ); assertEquals( record43, cursor.get() ); - IntRecord record = new IntRecord( -1 ); - assertTrue( cursor.next( idOnAnotherPage, record, NORMAL ) ); - assertEquals( record43, record ); - // next with id does not affect the old pointer either, so 42 is read now assertTrue( cursor.next() ); assertEquals( record42, cursor.get() ); diff --git a/community/kernel/src/test/java/org/neo4j/unsafe/impl/batchimport/staging/ReadRecordsStepTest.java b/community/kernel/src/test/java/org/neo4j/unsafe/impl/batchimport/staging/ReadRecordsStepTest.java index 5413c308b6540..8cafc5fbb352e 100644 --- a/community/kernel/src/test/java/org/neo4j/unsafe/impl/batchimport/staging/ReadRecordsStepTest.java +++ b/community/kernel/src/test/java/org/neo4j/unsafe/impl/batchimport/staging/ReadRecordsStepTest.java @@ -157,11 +157,5 @@ public boolean next( long id ) record.setId( id ); return populator.test( record ); } - - @Override - public boolean next( long id, RECORD record, RecordLoad mode ) - { - throw new UnsupportedOperationException(); - } } }