Skip to content

Commit

Permalink
Drop 'Store' prefix from PropertyCursors
Browse files Browse the repository at this point in the history
  • Loading branch information
davidegrohmann committed May 8, 2017
1 parent 164707e commit 5dd935c
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 77 deletions.
Expand Up @@ -35,9 +35,9 @@
import static org.neo4j.kernel.api.StatementConstants.NO_SUCH_PROPERTY; import static org.neo4j.kernel.api.StatementConstants.NO_SUCH_PROPERTY;
import static org.neo4j.kernel.impl.store.record.RecordLoad.FORCE; import static org.neo4j.kernel.impl.store.record.RecordLoad.FORCE;


public abstract class StoreAbstractPropertyCursor implements PropertyItem, Cursor<PropertyItem>, Disposable public abstract class AbstractPropertyCursor implements PropertyItem, Cursor<PropertyItem>, Disposable
{ {
private final StorePropertyPayloadCursor payload; private final PropertyPayloadCursor payload;
private final PageCursor cursor; private final PageCursor cursor;
private final PropertyRecord record; private final PropertyRecord record;
private final PropertyStore propertyStore; private final PropertyStore propertyStore;
Expand All @@ -50,12 +50,12 @@ public abstract class StoreAbstractPropertyCursor implements PropertyItem, Curso
private Lock lock; private Lock lock;
protected PropertyContainerState state; protected PropertyContainerState state;


StoreAbstractPropertyCursor( PropertyStore propertyStore ) AbstractPropertyCursor( PropertyStore propertyStore )
{ {
this.cursor = propertyStore.newPageCursor(); this.cursor = propertyStore.newPageCursor();
this.propertyStore = propertyStore; this.propertyStore = propertyStore;
this.record = propertyStore.newRecord(); this.record = propertyStore.newRecord();
this.payload = new StorePropertyPayloadCursor( propertyStore.getStringStore(), propertyStore.getArrayStore() ); this.payload = new PropertyPayloadCursor( propertyStore.getStringStore(), propertyStore.getArrayStore() );
} }


protected final void initialize( IntPredicate propertyKeyIds, long firstPropertyId, Lock lock, protected final void initialize( IntPredicate propertyKeyIds, long firstPropertyId, Lock lock,
Expand Down
Expand Up @@ -40,8 +40,8 @@ public class GlobalCursorPools implements CursorPools
private final CursorPool<StoreSingleRelationshipCursor> singleRelationshipCursor; private final CursorPool<StoreSingleRelationshipCursor> singleRelationshipCursor;
private final CursorPool<StoreIteratorRelationshipCursor> iteratorRelationshipCursor; private final CursorPool<StoreIteratorRelationshipCursor> iteratorRelationshipCursor;
private final CursorPool<StoreNodeRelationshipCursor> nodeRelationshipsCursor; private final CursorPool<StoreNodeRelationshipCursor> nodeRelationshipsCursor;
private final CursorPool<StorePropertyCursor> propertyCursor; private final CursorPool<PropertyCursor> propertyCursor;
private final CursorPool<StoreSinglePropertyCursor> singlePropertyCursor; private final CursorPool<SinglePropertyCursor> singlePropertyCursor;
private final CursorPool<RelationshipGroupCursor> relationshipGroupCursorCache; private final CursorPool<RelationshipGroupCursor> relationshipGroupCursorCache;
private final CursorPool<DenseNodeDegreeCounter> degreeCounter; private final CursorPool<DenseNodeDegreeCounter> degreeCounter;
private final NeoStores neoStores; private final NeoStores neoStores;
Expand All @@ -59,9 +59,9 @@ public GlobalCursorPools( NeoStores neoStores, LockService lockService )
cache -> new StoreNodeRelationshipCursor( neoStores.getRelationshipStore(), cache -> new StoreNodeRelationshipCursor( neoStores.getRelationshipStore(),
neoStores.getRelationshipGroupStore(), cache, lockService ) ); neoStores.getRelationshipGroupStore(), cache, lockService ) );
this.propertyCursor = this.propertyCursor =
new CursorPool<>( 10, cache -> new StorePropertyCursor( neoStores.getPropertyStore(), cache ) ); new CursorPool<>( 10, cache -> new PropertyCursor( neoStores.getPropertyStore(), cache ) );
this.singlePropertyCursor = this.singlePropertyCursor =
new CursorPool<>( 10, cache -> new StoreSinglePropertyCursor( neoStores.getPropertyStore(), cache ) ); new CursorPool<>( 10, cache -> new SinglePropertyCursor( neoStores.getPropertyStore(), cache ) );
this.degreeCounter = new CursorPool<>( 10, this.degreeCounter = new CursorPool<>( 10,
cache -> new DenseNodeDegreeCounter( neoStores.getRelationshipStore(), cache -> new DenseNodeDegreeCounter( neoStores.getRelationshipStore(),
neoStores.getRelationshipGroupStore(), cache ) ); neoStores.getRelationshipGroupStore(), cache ) );
Expand Down
Expand Up @@ -33,19 +33,19 @@
/** /**
* Cursor for all properties on a node or relationship. * Cursor for all properties on a node or relationship.
*/ */
public class StorePropertyCursor extends StoreAbstractPropertyCursor public class PropertyCursor extends AbstractPropertyCursor
{ {
private final Consumer<StorePropertyCursor> consumer; private final Consumer<PropertyCursor> consumer;


private Iterator<StorageProperty> storagePropertyIterator; private Iterator<StorageProperty> storagePropertyIterator;


public StorePropertyCursor( PropertyStore propertyStore, Consumer<StorePropertyCursor> consumer ) public PropertyCursor( PropertyStore propertyStore, Consumer<PropertyCursor> consumer )
{ {
super( propertyStore ); super( propertyStore );
this.consumer = consumer; this.consumer = consumer;
} }


public StorePropertyCursor init( long firstPropertyId, Lock lock, PropertyContainerState state ) public PropertyCursor init( long firstPropertyId, Lock lock, PropertyContainerState state )
{ {
storagePropertyIterator = state.addedProperties(); storagePropertyIterator = state.addedProperties();
initialize( ALWAYS_TRUE_INT, firstPropertyId, lock, state ); initialize( ALWAYS_TRUE_INT, firstPropertyId, lock, state );
Expand Down
Expand Up @@ -48,7 +48,7 @@
* During initialization the raw property block {@code long}s are read from * During initialization the raw property block {@code long}s are read from
* the given property record. * the given property record.
*/ */
class StorePropertyPayloadCursor implements Disposable class PropertyPayloadCursor implements Disposable
{ {
private static final int MAX_BYTES_IN_SHORT_STRING_OR_SHORT_ARRAY = 32; private static final int MAX_BYTES_IN_SHORT_STRING_OR_SHORT_ARRAY = 32;
private static final int INTERNAL_BYTE_ARRAY_SIZE = 4096; private static final int INTERNAL_BYTE_ARRAY_SIZE = 4096;
Expand All @@ -72,7 +72,7 @@ class StorePropertyPayloadCursor implements Disposable
private IntPredicate propertyKeyIds; private IntPredicate propertyKeyIds;
private boolean exhausted; private boolean exhausted;


StorePropertyPayloadCursor( DynamicStringStore stringStore, DynamicArrayStore arrayStore ) PropertyPayloadCursor( DynamicStringStore stringStore, DynamicArrayStore arrayStore )
{ {
this.record = stringStore.newRecord(); this.record = stringStore.newRecord();
this.stringStore = stringStore; this.stringStore = stringStore;
Expand Down
Expand Up @@ -26,18 +26,18 @@
import org.neo4j.kernel.impl.store.PropertyStore; import org.neo4j.kernel.impl.store.PropertyStore;
import org.neo4j.storageengine.api.txstate.PropertyContainerState; import org.neo4j.storageengine.api.txstate.PropertyContainerState;


public class StoreSinglePropertyCursor extends StoreAbstractPropertyCursor public class SinglePropertyCursor extends AbstractPropertyCursor
{ {
private final Consumer<StoreSinglePropertyCursor> consumer; private final Consumer<SinglePropertyCursor> consumer;
private int propertyKeyId; private int propertyKeyId;


StoreSinglePropertyCursor( PropertyStore propertyStore, Consumer<StoreSinglePropertyCursor> consumer ) SinglePropertyCursor( PropertyStore propertyStore, Consumer<SinglePropertyCursor> consumer )
{ {
super( propertyStore ); super( propertyStore );
this.consumer = consumer; this.consumer = consumer;
} }


public StoreSinglePropertyCursor init( int propertyKeyId, long firstPropertyId, Lock lock, public SinglePropertyCursor init( int propertyKeyId, long firstPropertyId, Lock lock,
PropertyContainerState state ) PropertyContainerState state )
{ {
this.propertyKeyId = propertyKeyId; this.propertyKeyId = propertyKeyId;
Expand Down
Expand Up @@ -46,7 +46,7 @@ public class PropertyRecord extends AbstractBaseRecord implements Iterable<Prope
private long nextProp; private long nextProp;
private long prevProp; private long prevProp;
// Holds the purely physical representation of the loaded properties in this record. This is so that // Holds the purely physical representation of the loaded properties in this record. This is so that
// StorePropertyCursor is able to use this raw data without the rather heavy and bloated data structures // PropertyCursor is able to use this raw data without the rather heavy and bloated data structures
// of PropertyBlock and thereabouts. So when a property record is loaded only these blocks are read, // of PropertyBlock and thereabouts. So when a property record is loaded only these blocks are read,
// the construction of all PropertyBlock instances are loaded lazile when they are first needed, loaded // the construction of all PropertyBlock instances are loaded lazile when they are first needed, loaded
// by ensureBlocksLoaded(). // by ensureBlocksLoaded().
Expand Down
Expand Up @@ -50,7 +50,7 @@
import org.neo4j.io.pagecache.PagedFile; import org.neo4j.io.pagecache.PagedFile;
import org.neo4j.kernel.api.index.SchemaIndexProvider; import org.neo4j.kernel.api.index.SchemaIndexProvider;
import org.neo4j.kernel.configuration.Config; import org.neo4j.kernel.configuration.Config;
import org.neo4j.kernel.impl.api.store.StorePropertyCursor; import org.neo4j.kernel.impl.api.store.PropertyCursor;
import org.neo4j.kernel.impl.locking.LockService; import org.neo4j.kernel.impl.locking.LockService;
import org.neo4j.kernel.impl.logging.LogService; import org.neo4j.kernel.impl.logging.LogService;
import org.neo4j.kernel.impl.store.CountsComputer; import org.neo4j.kernel.impl.store.CountsComputer;
Expand Down Expand Up @@ -93,7 +93,6 @@
import org.neo4j.kernel.impl.util.CustomIOConfigValidator; import org.neo4j.kernel.impl.util.CustomIOConfigValidator;
import org.neo4j.kernel.lifecycle.Lifespan; import org.neo4j.kernel.lifecycle.Lifespan;
import org.neo4j.logging.NullLogProvider; import org.neo4j.logging.NullLogProvider;
import org.neo4j.storageengine.api.txstate.NodeState;
import org.neo4j.storageengine.api.txstate.PropertyContainerState; import org.neo4j.storageengine.api.txstate.PropertyContainerState;
import org.neo4j.unsafe.impl.batchimport.AdditionalInitialIds; import org.neo4j.unsafe.impl.batchimport.AdditionalInitialIds;
import org.neo4j.unsafe.impl.batchimport.BatchImporter; import org.neo4j.unsafe.impl.batchimport.BatchImporter;
Expand Down Expand Up @@ -685,7 +684,7 @@ private <ENTITY extends InputEntity, RECORD extends PrimitiveRecord> BiConsumer<
}; };
} }


final StorePropertyCursor cursor = new StorePropertyCursor( propertyStore, ignored -> {} ); final PropertyCursor cursor = new PropertyCursor( propertyStore, ignored -> {} );
final List<Object> scratch = new ArrayList<>(); final List<Object> scratch = new ArrayList<>();
return ( ENTITY entity, RECORD record ) -> return ( ENTITY entity, RECORD record ) ->
{ {
Expand Down
Expand Up @@ -54,7 +54,6 @@
import org.neo4j.kernel.impl.store.record.PropertyRecord; import org.neo4j.kernel.impl.store.record.PropertyRecord;
import org.neo4j.logging.NullLogProvider; import org.neo4j.logging.NullLogProvider;
import org.neo4j.storageengine.api.PropertyItem; import org.neo4j.storageengine.api.PropertyItem;
import org.neo4j.storageengine.api.txstate.PropertyContainerState;
import org.neo4j.test.rule.PageCacheRule; import org.neo4j.test.rule.PageCacheRule;
import org.neo4j.test.rule.fs.EphemeralFileSystemRule; import org.neo4j.test.rule.fs.EphemeralFileSystemRule;


Expand All @@ -74,7 +73,7 @@
import static org.neo4j.storageengine.api.txstate.PropertyContainerState.EMPTY; import static org.neo4j.storageengine.api.txstate.PropertyContainerState.EMPTY;


@RunWith( Enclosed.class ) @RunWith( Enclosed.class )
public class StorePropertyCursorTest public class PropertyCursorTest
{ {
private static final List<Object[]> PARAMETERS = asList( private static final List<Object[]> PARAMETERS = asList(
new Object[]{false, PropertyType.BOOL}, new Object[]{false, PropertyType.BOOL},
Expand Down Expand Up @@ -243,35 +242,35 @@ public void shouldReturnTheCursorToTheCacheOnClose() throws Throwable
{ {
// given // given
@SuppressWarnings( "unchecked" ) @SuppressWarnings( "unchecked" )
Consumer<StorePropertyCursor> cache = mock( Consumer.class ); Consumer<PropertyCursor> cache = mock( Consumer.class );


StorePropertyCursor storePropertyCursor = new StorePropertyCursor( propertyStore, cache ); PropertyCursor propertyCursor = new PropertyCursor( propertyStore, cache );
storePropertyCursor.init( 0, NO_LOCK, EMPTY ); propertyCursor.init( 0, NO_LOCK, EMPTY );


// when // when
storePropertyCursor.close(); propertyCursor.close();


// then // then
verify( cache, times( 1 ) ).accept( storePropertyCursor ); verify( cache, times( 1 ) ).accept( propertyCursor );
} }


@Test @Test
public void shouldClosePageCursorsOnDispose() throws Throwable public void shouldClosePageCursorsOnDispose() throws Throwable
{ {
// given // given
PageCursor propertyCursor = mock( PageCursor.class ); PageCursor cursor = mock( PageCursor.class );
when( propertyStore.newPageCursor() ).thenReturn( propertyCursor ); when( propertyStore.newPageCursor() ).thenReturn( cursor );
PageCursor stringCursor = mock( PageCursor.class ); PageCursor stringCursor = mock( PageCursor.class );
when( stringStore.newPageCursor() ).thenReturn( stringCursor ); when( stringStore.newPageCursor() ).thenReturn( stringCursor );
PageCursor arrayCursor = mock( PageCursor.class ); PageCursor arrayCursor = mock( PageCursor.class );
when( arrayStore.newPageCursor() ).thenReturn( arrayCursor ); when( arrayStore.newPageCursor() ).thenReturn( arrayCursor );
StorePropertyCursor storePropertyCursor = new StorePropertyCursor( propertyStore, c -> {} ); PropertyCursor propertyCursor = new PropertyCursor( propertyStore, c -> {} );


// when // when
storePropertyCursor.dispose(); propertyCursor.dispose();


// then // then
verify( propertyCursor ).close(); verify( cursor ).close();
verify( stringCursor ).close(); verify( stringCursor ).close();
verify( arrayCursor ).close(); verify( arrayCursor ).close();
} }
Expand Down Expand Up @@ -343,10 +342,10 @@ public void shouldReturnAProperty() throws Throwable


long recordId = createSinglePropertyValue( propertyStore, keyId, expectedValue ).getId(); long recordId = createSinglePropertyValue( propertyStore, keyId, expectedValue ).getId();


StorePropertyCursor storePropertyCursor = newStorePropertyCursor( propertyStore ); PropertyCursor propertyCursor = newPropertyCursor( propertyStore );


// when // when
try ( Cursor<PropertyItem> cursor = storePropertyCursor.init( recordId, NO_LOCK, EMPTY ) ) try ( Cursor<PropertyItem> cursor = propertyCursor.init( recordId, NO_LOCK, EMPTY ) )
{ {
// then // then
assertTrue( cursor.next() ); assertTrue( cursor.next() );
Expand Down Expand Up @@ -406,10 +405,10 @@ public void shouldReturnAPropertyBySkippingOne() throws Throwable
long recordId = createTwoPropertyValues( long recordId = createTwoPropertyValues(
propertyStore, keyId1, expectedValue1, keyId2, expectedValue2 ).getId(); propertyStore, keyId1, expectedValue1, keyId2, expectedValue2 ).getId();


StorePropertyCursor storePropertyCursor = newStorePropertyCursor( propertyStore ); PropertyCursor propertyCursor = newPropertyCursor( propertyStore );


// when // when
try ( Cursor<PropertyItem> cursor = storePropertyCursor.init( recordId, NO_LOCK, EMPTY ) ) try ( Cursor<PropertyItem> cursor = propertyCursor.init( recordId, NO_LOCK, EMPTY ) )
{ {
// then // then
assertTrue( cursor.next() ); assertTrue( cursor.next() );
Expand Down Expand Up @@ -438,10 +437,10 @@ public void shouldReturnTwoProperties() throws Throwable
long recordId = createTwoPropertyValues( long recordId = createTwoPropertyValues(
propertyStore, keyId1, expectedValue1, keyId2, expectedValue2 ).getId(); propertyStore, keyId1, expectedValue1, keyId2, expectedValue2 ).getId();


StorePropertyCursor storePropertyCursor = newStorePropertyCursor( propertyStore ); PropertyCursor propertyCursor = newPropertyCursor( propertyStore );


// when // when
try ( Cursor<PropertyItem> cursor = storePropertyCursor.init( recordId, NO_LOCK, EMPTY ) ) try ( Cursor<PropertyItem> cursor = propertyCursor.init( recordId, NO_LOCK, EMPTY ) )
{ {
PropertyItem item; PropertyItem item;


Expand Down Expand Up @@ -485,9 +484,9 @@ public void shouldReuseCorrectlyCursor() throws Throwable


long recordId = createSinglePropertyValue( propertyStore, keyId, expectedValue ).getId(); long recordId = createSinglePropertyValue( propertyStore, keyId, expectedValue ).getId();


StorePropertyCursor storePropertyCursor = newStorePropertyCursor( propertyStore ); PropertyCursor propertyCursor = newPropertyCursor( propertyStore );


try ( Cursor<PropertyItem> cursor = storePropertyCursor.init( recordId, NO_LOCK, EMPTY ) ) try ( Cursor<PropertyItem> cursor = propertyCursor.init( recordId, NO_LOCK, EMPTY ) )
{ {
assertTrue( cursor.next() ); assertTrue( cursor.next() );
PropertyItem item = cursor.get(); PropertyItem item = cursor.get();
Expand All @@ -497,7 +496,7 @@ public void shouldReuseCorrectlyCursor() throws Throwable
} }


// when using it // when using it
try ( Cursor<PropertyItem> cursor = storePropertyCursor.init( recordId, NO_LOCK, EMPTY ) ) try ( Cursor<PropertyItem> cursor = propertyCursor.init( recordId, NO_LOCK, EMPTY ) )
{ {
// then // then
assertTrue( cursor.next() ); assertTrue( cursor.next() );
Expand All @@ -519,7 +518,7 @@ public void readPropertyChainWithMultipleEntries()


long firstPropertyId = firstIdOf( createPropertyChain( propertyStore, propertyKeyId, propertyValues ) ); long firstPropertyId = firstIdOf( createPropertyChain( propertyStore, propertyKeyId, propertyValues ) );


try ( StorePropertyCursor cursor = newStorePropertyCursor( propertyStore ) ) try ( PropertyCursor cursor = newPropertyCursor( propertyStore ) )
{ {
cursor.init( firstPropertyId, NO_LOCK, EMPTY ); cursor.init( firstPropertyId, NO_LOCK, EMPTY );


Expand All @@ -535,7 +534,7 @@ public void callNextAfterReadingPropertyChain()


long firstPropertyId = firstIdOf( createPropertyChain( propertyStore, propertyKeyId, "1", "2" ) ); long firstPropertyId = firstIdOf( createPropertyChain( propertyStore, propertyKeyId, "1", "2" ) );


try ( StorePropertyCursor cursor = newStorePropertyCursor( propertyStore ) ) try ( PropertyCursor cursor = newPropertyCursor( propertyStore ) )
{ {
cursor.init( firstPropertyId, NO_LOCK, EMPTY ); cursor.init( firstPropertyId, NO_LOCK, EMPTY );


Expand All @@ -561,7 +560,7 @@ public void skipUnusedRecordsInChain()
long firstPropertyId = firstIdOf( propertyChain ); long firstPropertyId = firstIdOf( propertyChain );
markPropertyRecordsNoInUse( propertyStore, idsOf( propertyChain, 1, 2, 4 ) ); markPropertyRecordsNoInUse( propertyStore, idsOf( propertyChain, 1, 2, 4 ) );


try ( StorePropertyCursor cursor = newStorePropertyCursor( propertyStore ) ) try ( PropertyCursor cursor = newPropertyCursor( propertyStore ) )
{ {
cursor.init( firstPropertyId, NO_LOCK, EMPTY ); cursor.init( firstPropertyId, NO_LOCK, EMPTY );


Expand All @@ -580,7 +579,7 @@ public void skipUnusedConsecutiveRecordsInChain()
long firstPropertyId = firstIdOf( propertyChain ); long firstPropertyId = firstIdOf( propertyChain );
markPropertyRecordsNoInUse( propertyStore, idsOf( propertyChain, 2, 1, 3 ) ); markPropertyRecordsNoInUse( propertyStore, idsOf( propertyChain, 2, 1, 3 ) );


try ( StorePropertyCursor cursor = newStorePropertyCursor( propertyStore ) ) try ( PropertyCursor cursor = newPropertyCursor( propertyStore ) )
{ {
cursor.init( firstPropertyId, NO_LOCK, EMPTY ); cursor.init( firstPropertyId, NO_LOCK, EMPTY );


Expand All @@ -600,7 +599,7 @@ public void skipAllRecordsWhenWholeChainNotInUse()
int[] recordIds = idsOf( propertyChain, 0, 1, propertyValues.length ); int[] recordIds = idsOf( propertyChain, 0, 1, propertyValues.length );
markPropertyRecordsNoInUse( propertyStore, recordIds ); markPropertyRecordsNoInUse( propertyStore, recordIds );


try ( StorePropertyCursor cursor = newStorePropertyCursor( propertyStore ) ) try ( PropertyCursor cursor = newPropertyCursor( propertyStore ) )
{ {
cursor.init( firstPropertyId, NO_LOCK, EMPTY ); cursor.init( firstPropertyId, NO_LOCK, EMPTY );


Expand All @@ -619,7 +618,7 @@ public void readPropertyChainWithLongStringDynamicRecordsNotInUse()


markDynamicRecordsNotInUse( keyId, propertyChain.get( 1 ), propertyStore, 2 ); markDynamicRecordsNotInUse( keyId, propertyChain.get( 1 ), propertyStore, 2 );


try ( StorePropertyCursor cursor = newStorePropertyCursor( propertyStore ) ) try ( PropertyCursor cursor = newPropertyCursor( propertyStore ) )
{ {
cursor.init( chainStartId, NO_LOCK, EMPTY ); cursor.init( chainStartId, NO_LOCK, EMPTY );


Expand Down Expand Up @@ -685,7 +684,7 @@ public void readPropertyChainWithLongArrayDynamicRecordsNotInUse()


markDynamicRecordsNotInUse( keyId, propertyChain.get( 1 ), propertyStore, 2 ); markDynamicRecordsNotInUse( keyId, propertyChain.get( 1 ), propertyStore, 2 );


try ( StorePropertyCursor cursor = newStorePropertyCursor( propertyStore ) ) try ( PropertyCursor cursor = newPropertyCursor( propertyStore ) )
{ {
cursor.init( chainStartId, NO_LOCK, EMPTY ); cursor.init( chainStartId, NO_LOCK, EMPTY );


Expand Down Expand Up @@ -723,7 +722,7 @@ public void readPropertyValueWhenSomeLongArrayDynamicRecordsAreNotInUse()


private void verifyPropertyValue( String expectedValue, long recordId ) private void verifyPropertyValue( String expectedValue, long recordId )
{ {
try ( StorePropertyCursor cursor = newStorePropertyCursor( propertyStore ) ) try ( PropertyCursor cursor = newPropertyCursor( propertyStore ) )
{ {
cursor.init( recordId, NO_LOCK, EMPTY ); cursor.init( recordId, NO_LOCK, EMPTY );
assertTrue( cursor.next() ); assertTrue( cursor.next() );
Expand All @@ -734,7 +733,7 @@ private void verifyPropertyValue( String expectedValue, long recordId )


private void verifyPropertyValue( byte[] expectedValue, long recordId ) private void verifyPropertyValue( byte[] expectedValue, long recordId )
{ {
try ( StorePropertyCursor cursor = newStorePropertyCursor( propertyStore ) ) try ( PropertyCursor cursor = newPropertyCursor( propertyStore ) )
{ {
cursor.init( recordId, NO_LOCK, EMPTY ); cursor.init( recordId, NO_LOCK, EMPTY );
assertTrue( cursor.next() ); assertTrue( cursor.next() );
Expand Down Expand Up @@ -764,9 +763,9 @@ public static long firstIdOf( List<PropertyRecord> propertyChain )
return propertyChain.get( 0 ).getId(); return propertyChain.get( 0 ).getId();
} }


private static StorePropertyCursor newStorePropertyCursor( PropertyStore propertyStore ) private static PropertyCursor newPropertyCursor( PropertyStore propertyStore )
{ {
return new StorePropertyCursor( propertyStore, ignored -> {} ); return new PropertyCursor( propertyStore, ignored -> {} );
} }


private static List<PropertyRecord> createPropertyChain( PropertyStore store, int keyId, private static List<PropertyRecord> createPropertyChain( PropertyStore store, int keyId,
Expand Down Expand Up @@ -876,7 +875,7 @@ private static void markDynamicRecordsNotInUse( int keyId, PropertyRecord record
updateRecord( store, record ); updateRecord( store, record );
} }


private static List<Object> asPropertyValuesList( StorePropertyCursor cursor ) private static List<Object> asPropertyValuesList( PropertyCursor cursor )
{ {
List<Object> values = new ArrayList<>(); List<Object> values = new ArrayList<>();
while ( cursor.next() ) while ( cursor.next() )
Expand Down

0 comments on commit 5dd935c

Please sign in to comment.