Tabnine Logo
RecordStore.nextId
Code IndexAdd Tabnine to your IDE (free)

How to use
nextId
method
in
org.neo4j.kernel.impl.store.RecordStore

Best Java code snippets using org.neo4j.kernel.impl.store.RecordStore.nextId (Showing top 14 results out of 315)

origin: neo4j/neo4j

@Override
public long nextId()
{
  return actual.nextId();
}
origin: neo4j/neo4j

public long newRuleId()
{
  return schemaStore.nextId();
}
origin: neo4j/neo4j

@Override
public long visit( long nodeId, int typeId, long out, long in, long loop )
{
  long id = store.nextId();
  RelationshipGroupRecord record = batch[cursor++];
  record.setId( id );
  record.initialize( true, typeId, out, in, loop, nodeId, loop );
  if ( cursor == batchSize )
  {
    send();
    batch = control.reuse( this );
    cursor = 0;
  }
  return id;
}
origin: neo4j/neo4j

boolean lastInChain = count == 0;
group.setId( nextId == -1 ? nextId = store.nextId() : nextId );
if ( !lastInChain )
  group.setNext( nextId = store.nextId() );
origin: neo4j/neo4j

final AtomicLong nextId = new AtomicLong();
RecordStore<RelationshipGroupRecord> store = mock( RecordStore.class );
when( store.nextId() ).thenAnswer( invocation -> nextId.incrementAndGet() );
doAnswer( invocation ->
origin: neo4j/neo4j

private <RECORD extends AbstractBaseRecord> void createRecordIn( RecordStore<RECORD> store )
{
  RECORD record = store.newRecord();
  record.setId( store.nextId() );
  record.setInUse( true );
  if ( record instanceof PropertyRecord )
  {
    // Special hack for property store, since it's not enough to simply set a record as in use there
    PropertyBlock block = new PropertyBlock();
    ((PropertyStore)store).encodeValue( block, 0, Values.of( 10 ) );
    ((PropertyRecord) record).addPropertyBlock( block );
  }
  store.updateRecord( record );
}
origin: neo4j/neo4j

groupRecord.setId( groupStore.nextId() );
groupStore.updateRecord( groupRecord );
origin: neo4j/neo4j

@Test
public void shouldReportRelationshipTypeInconsistencies() throws Exception
{
  // given
  StoreAccess access = fixture.directStoreAccess().nativeStores();
  RecordStore<RelationshipTypeTokenRecord> relTypeStore = access.getRelationshipTypeTokenStore();
  RelationshipTypeTokenRecord record = relTypeStore.getRecord( (int) relTypeStore.nextId(),
      relTypeStore.newRecord(), FORCE );
  record.setNameId( 20 );
  record.setInUse( true );
  relTypeStore.updateRecord( record );
  // when
  ConsistencySummaryStatistics stats = check();
  // then
  access.close();
  on( stats ).verify( RecordType.RELATIONSHIP_TYPE, 1 )
        .andThatsAllFolks();
}
origin: neo4j/neo4j

groupRecord.setId( groupStore.nextId() );
groupStore.updateRecord( groupRecord );
origin: org.neo4j/neo4j-kernel

@Override
public long nextId()
{
  return actual.nextId();
}
origin: org.neo4j/neo4j-kernel

public long newRuleId()
{
  return schemaStore.nextId();
}
origin: org.neo4j/neo4j-kernel

@Override
public long visit( long nodeId, int typeId, long out, long in, long loop )
{
  long id = store.nextId();
  RelationshipGroupRecord record = batch[cursor++];
  record.setId( id );
  record.initialize( true, typeId, out, in, loop, nodeId, loop );
  if ( cursor == batchSize )
  {
    send();
    batch = control.reuse( this );
    cursor = 0;
  }
  return id;
}
origin: org.neo4j/neo4j-kernel

boolean lastInChain = count == 0;
group.setId( nextId == -1 ? nextId = store.nextId() : nextId );
if ( !lastInChain )
  group.setNext( nextId = store.nextId() );
origin: org.neo4j/neo4j-consistency-check-legacy

@Test
public void shouldReportRelationshipTypeInconsistencies() throws Exception
{
  // given
  StoreAccess access = fixture.directStoreAccess().nativeStores();
  RecordStore<RelationshipTypeTokenRecord> relTypeStore = access.getRelationshipTypeTokenStore();
  RelationshipTypeTokenRecord record = relTypeStore.forceGetRecord( (int) relTypeStore.nextId() );
  record.setNameId( 20 );
  record.setInUse( true );
  relTypeStore.updateRecord( record );
  // when
  ConsistencySummaryStatistics stats = check( fixture.directStoreAccess() );
  // then
  access.close();
  on( stats ).verify( RecordType.RELATIONSHIP_TYPE, 1 )
        .andThatsAllFolks();
}
org.neo4j.kernel.impl.storeRecordStorenextId

Popular methods of RecordStore

  • getRecord
    Utility methods for reading records. These are not on the interface itself since it should be an exp
  • getHighId
  • newRecord
  • updateRecord
    Updates this store with the contents of record at the record id AbstractBaseRecord#getId() by the re
  • getRecordSize
  • getRecordDataSize
  • setHighestPossibleIdInUse
    Sets highest id in use for this store. This is for when records are applied to this store where the
  • ensureHeavy
    For stores that have other stores coupled underneath, the "top level" record will have a flag saying
  • getNumberOfReservedLowIds
    Some stores may have meta data stored in the header of the store file. Since all records in a store
  • getRecordsPerPage
  • getStorageFile
  • prepareForCommit
    Called once all changes to a record is ready to be converted into a command. WARNING this is for adv
  • getStorageFile,
  • prepareForCommit,
  • accept,
  • addRecord,
  • close,
  • closeRecordStore,
  • deleteRecord,
  • enumerateRecords,
  • flush

Popular in Java

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • setRequestProperty (URLConnection)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now