Codota Logo
RecordStore.nextId
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
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

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • notifyDataSetChanged (ArrayAdapter)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Path (java.nio.file)
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now